@foxy.io/elements 1.18.0-beta.2 → 1.18.0-beta.3

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 (158) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-api-browser.js +1 -1
  5. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-card.js +1 -1
  7. package/dist/cdn/foxy-attribute-form.js +1 -1
  8. package/dist/cdn/foxy-cancellation-form.js +1 -1
  9. package/dist/cdn/foxy-collection-page.js +1 -1
  10. package/dist/cdn/foxy-collection-pages.js +1 -1
  11. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  12. package/dist/cdn/foxy-coupon-card.js +1 -1
  13. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  14. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  15. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  16. package/dist/cdn/foxy-coupon-form.js +1 -1
  17. package/dist/cdn/foxy-custom-field-card.js +1 -1
  18. package/dist/cdn/foxy-custom-field-form.js +1 -1
  19. package/dist/cdn/foxy-customer-api.js +1 -1
  20. package/dist/cdn/foxy-customer-card.js +1 -1
  21. package/dist/cdn/foxy-customer-form.js +1 -1
  22. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  23. package/dist/cdn/foxy-customer-portal.js +2 -2
  24. package/dist/cdn/foxy-customer.js +6 -6
  25. package/dist/cdn/foxy-customers-table.js +1 -1
  26. package/dist/cdn/foxy-discount-builder.js +1 -1
  27. package/dist/cdn/foxy-discount-card.js +1 -1
  28. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  29. package/dist/cdn/foxy-donation.js +1 -1
  30. package/dist/cdn/foxy-email-template-form.js +1 -1
  31. package/dist/cdn/foxy-error-entry-card.js +1 -1
  32. package/dist/cdn/foxy-form-dialog.js +1 -1
  33. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  34. package/dist/cdn/foxy-gift-card-card.js +1 -1
  35. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  36. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  37. package/dist/cdn/foxy-gift-card-form.js +1 -1
  38. package/dist/cdn/foxy-i18n.js +1 -1
  39. package/dist/cdn/foxy-item-card.js +1 -1
  40. package/dist/cdn/foxy-item-form.js +1 -1
  41. package/dist/cdn/foxy-item-option-card.js +1 -1
  42. package/dist/cdn/foxy-item-option-form.js +1 -1
  43. package/dist/cdn/foxy-items-form.js +1 -1
  44. package/dist/cdn/foxy-nucleon-element.js +1 -1
  45. package/dist/cdn/foxy-pagination.js +1 -1
  46. package/dist/cdn/foxy-payment-card.js +1 -1
  47. package/dist/cdn/foxy-payment-method-card.js +1 -1
  48. package/dist/cdn/foxy-query-builder.js +1 -1
  49. package/dist/cdn/foxy-report-form.js +6 -6
  50. package/dist/cdn/foxy-reports-table.js +1 -1
  51. package/dist/cdn/foxy-shipment-card.js +1 -1
  52. package/dist/cdn/foxy-sign-in-form.js +1 -1
  53. package/dist/cdn/foxy-spinner.js +2 -2
  54. package/dist/cdn/foxy-store-shipping-method-form.js +4 -4
  55. package/dist/cdn/foxy-subscription-card.js +1 -1
  56. package/dist/cdn/foxy-subscription-form.js +3 -3
  57. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  58. package/dist/cdn/foxy-table.js +1 -1
  59. package/dist/cdn/foxy-tax-card.js +1 -1
  60. package/dist/cdn/foxy-tax-form.js +1 -1
  61. package/dist/cdn/foxy-template-config-form.js +1 -1
  62. package/dist/cdn/foxy-template-form.js +1 -1
  63. package/dist/cdn/foxy-transaction-card.js +1 -1
  64. package/dist/cdn/foxy-transaction.js +1 -1
  65. package/dist/cdn/foxy-transactions-table.js +1 -1
  66. package/dist/cdn/foxy-user-form.js +1 -1
  67. package/dist/cdn/foxy-users-table.js +1 -1
  68. package/dist/cdn/foxy-webhook-card.js +1 -1
  69. package/dist/cdn/foxy-webhook-form.js +5 -5
  70. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  71. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  72. package/dist/cdn/{shared-75e34b5b.js → shared-023c287a.js} +1 -1
  73. package/dist/cdn/{shared-8936b109.js → shared-084b6372.js} +1 -1
  74. package/dist/cdn/{shared-2caab7af.js → shared-11f0daea.js} +1 -1
  75. package/dist/cdn/{shared-48ef8a04.js → shared-189dfb49.js} +1 -1
  76. package/dist/cdn/{shared-2b077e01.js → shared-23fd456c.js} +3 -3
  77. package/dist/cdn/{shared-f966bbc3.js → shared-2ca6d676.js} +1 -1
  78. package/dist/cdn/{shared-da130124.js → shared-2f0efb2c.js} +1 -1
  79. package/dist/cdn/{shared-5652560a.js → shared-37b61010.js} +1 -1
  80. package/dist/cdn/{shared-d6ed2e5c.js → shared-381aa7fe.js} +1 -1
  81. package/dist/cdn/{shared-b772fbb1.js → shared-3a7cf739.js} +1 -1
  82. package/dist/cdn/{shared-fd001fd3.js → shared-3e3c07ac.js} +1 -1
  83. package/dist/cdn/{shared-4fc53390.js → shared-412670b8.js} +1 -1
  84. package/dist/cdn/{shared-dbdc2a38.js → shared-4560425c.js} +1 -1
  85. package/dist/cdn/{shared-2f186d21.js → shared-4773b634.js} +1 -1
  86. package/dist/cdn/{shared-e6a7b2f1.js → shared-4c0520f6.js} +1 -1
  87. package/dist/cdn/{shared-d673b138.js → shared-5482630e.js} +1 -1
  88. package/dist/cdn/{shared-6eeb69e7.js → shared-5e43b817.js} +1 -1
  89. package/dist/cdn/{shared-5f411ce2.js → shared-60c862aa.js} +1 -1
  90. package/dist/cdn/shared-619adfad.js +1 -0
  91. package/dist/cdn/{shared-e25c676a.js → shared-68ab037d.js} +1 -1
  92. package/dist/cdn/shared-6af95088.js +1 -0
  93. package/dist/cdn/shared-6ce2acfa.js +1 -0
  94. package/dist/cdn/{shared-8166ba00.js → shared-6f89d2e0.js} +1 -1
  95. package/dist/cdn/{shared-d539ee69.js → shared-71acf673.js} +1 -1
  96. package/dist/cdn/{shared-7ed7818e.js → shared-74a27421.js} +1 -1
  97. package/dist/cdn/{shared-59796faa.js → shared-80b90eec.js} +1 -1
  98. package/dist/cdn/{shared-30bb4828.js → shared-85d45495.js} +1 -1
  99. package/dist/cdn/{shared-b52c7edf.js → shared-872ceacf.js} +2 -2
  100. package/dist/cdn/{shared-12f8034b.js → shared-901ca702.js} +1 -1
  101. package/dist/cdn/{shared-c13674cb.js → shared-91b86bae.js} +1 -1
  102. package/dist/cdn/shared-9b392ba8.js +1 -0
  103. package/dist/cdn/{shared-1bbd9b73.js → shared-9be1a70f.js} +1 -1
  104. package/dist/cdn/{shared-29dd9d87.js → shared-9ef13805.js} +1 -1
  105. package/dist/cdn/{shared-6c1aab74.js → shared-9ef81b37.js} +1 -1
  106. package/dist/cdn/{shared-40689cd2.js → shared-a2a1193d.js} +1 -1
  107. package/dist/cdn/{shared-d6dd67a5.js → shared-a48a9dfc.js} +1 -1
  108. package/dist/cdn/{shared-17331dc5.js → shared-c0fb5a33.js} +1 -1
  109. package/dist/cdn/{shared-c5a638d1.js → shared-c63ba384.js} +1 -1
  110. package/dist/cdn/{shared-32b15545.js → shared-c7280a24.js} +1 -1
  111. package/dist/cdn/{shared-58a35351.js → shared-c7c8d1b6.js} +1 -1
  112. package/dist/cdn/{shared-fadcb2e1.js → shared-ca0f14c1.js} +1 -1
  113. package/dist/cdn/{shared-4473f0cf.js → shared-d91ed0a8.js} +1 -1
  114. package/dist/cdn/{shared-95f4cffd.js → shared-daa454bf.js} +1 -1
  115. package/dist/cdn/{shared-4f8fe424.js → shared-ec7cfc23.js} +2 -2
  116. package/dist/cdn/{shared-824f6e03.js → shared-f2639daf.js} +1 -1
  117. package/dist/cdn/{shared-33b47806.js → shared-f31044b8.js} +3 -3
  118. package/dist/cdn/{shared-2f19b670.js → shared-fcbf9a41.js} +1 -1
  119. package/dist/cdn/{shared-9f9cdbb0.js → shared-fd595d0a.js} +1 -1
  120. package/dist/cdn/{shared-a64ead08.js → shared-fe68657a.js} +1 -1
  121. package/dist/cdn/{shared-e06de519.js → shared-ff1d9854.js} +1 -1
  122. package/dist/cdn/translations/store-shipping-method-form/en.json +8 -1
  123. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +5 -2
  124. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
  125. package/dist/elements/public/NucleonElement/NucleonElement.d.ts +2 -1
  126. package/dist/elements/public/NucleonElement/NucleonElement.js +12 -10
  127. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  128. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +2 -2
  129. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +78 -28
  130. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
  131. package/dist/elements/public/index.d.ts +0 -1
  132. package/dist/elements/public/index.defined.d.ts +0 -1
  133. package/dist/elements/public/index.defined.js +0 -1
  134. package/dist/elements/public/index.defined.js.map +1 -1
  135. package/dist/elements/public/index.js +0 -1
  136. package/dist/elements/public/index.js.map +1 -1
  137. package/dist/mixins/configurable.js +16 -8
  138. package/dist/mixins/configurable.js.map +1 -1
  139. package/dist/mixins/inferrable.js +25 -23
  140. package/dist/mixins/inferrable.js.map +1 -1
  141. package/dist/mixins/themeable.js +0 -16
  142. package/dist/mixins/themeable.js.map +1 -1
  143. package/package.json +1 -1
  144. package/dist/cdn/foxy-store-shipping-method-card.js +0 -1
  145. package/dist/cdn/shared-0b9c755c.js +0 -1
  146. package/dist/cdn/shared-16d10bca.js +0 -1
  147. package/dist/cdn/shared-89dce718.js +0 -1
  148. package/dist/cdn/shared-fcdc4903.js +0 -1
  149. package/dist/cdn/translations/store-shipping-method-card/en.json +0 -15
  150. package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.d.ts +0 -16
  151. package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.js +0 -60
  152. package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.js.map +0 -1
  153. package/dist/elements/public/StoreShippingMethodCard/index.d.ts +0 -6
  154. package/dist/elements/public/StoreShippingMethodCard/index.js +0 -8
  155. package/dist/elements/public/StoreShippingMethodCard/index.js.map +0 -1
  156. package/dist/elements/public/StoreShippingMethodCard/types.d.ts +0 -5
  157. package/dist/elements/public/StoreShippingMethodCard/types.js +0 -2
  158. package/dist/elements/public/StoreShippingMethodCard/types.js.map +0 -1
@@ -1 +1 @@
1
- import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-da130124.js";import{h as t}from"./shared-dc73b9a5.js";import{C as e}from"./shared-30bb4828.js";import{N as s}from"./shared-89dce718.js";import{T as i,a as r}from"./shared-33b47806.js";import{c as a}from"./shared-4e709717.js";import"./shared-fd001fd3.js";import"./shared-c13674cb.js";import"./shared-4fc53390.js";import"./shared-fadcb2e1.js";import"./shared-b772fbb1.js";import"./shared-9803aa7c.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";let o,n,d,c,l,m,h,p,u,f,v,y,_=t=>t;const $=i(e(r(s,"transaction-card")));class x extends ${constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}render(){var e,s;const i=this.hiddenSelector,r=!i.matches("total",!0),d=!i.matches("status",!0);return t(o||(o=_` <div aria-busy="${0}" aria-live="polite" class="relative leading-m font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),r||d?t(n||(n=_` <div class="flex items-center justify-between"> ${0} ${0} </div> `),r?this.__renderTotal():"",d?this.__renderStatus():""):"",i.matches("description",!0)?"":this.__renderDescription(),i.matches("customer",!0)?"":this.__renderCustomer(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}async _sendGet(){const t=await super._sendGet(),e=await super._fetch(t._links["fx:store"].href);return this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",t}__renderTotal(){const e=this.data;let s;if(e){const i=`${e.total_order} ${e.currency_code}`,r=this.__currencyDisplay;s=t(d||(d=_` <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> `),JSON.stringify({amount:i,currencyDisplay:r}),this.lang,this.ns)}else s=t(c||(c=_`&ZeroWidthSpace;`));return t(l||(l=_` <div data-testid="total"> ${0} <div class="font-semibold truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),s,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var e,s,i,r;const a=(null===(e=this.data)||void 0===e?void 0:e.status)||"completed";return t(m||(m=_` <div data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-s"> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline text-l ${0}" title="${0}" icon="${0}"> </iron-icon> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:null===(s=this.data)||void 0===s?void 0:s.transaction_date}),this.lang,this.ns,null!==(i={completed:"text-success",rejected:"text-error",declined:"text-error"}[a])&&void 0!==i?i:"text-tertiary",this.t(`transaction_${a}`),null!==(r={completed:"icons:done-all",refunded:"icons:restore",rejected:"icons:highlight-off",declined:"icons:highlight-off",voided:"icons:remove-circle-outline"}[a])&&void 0!==r?r:"icons:schedule",this.renderTemplateOrSlot("status:after"))}__renderDescription(){var e,s;const i=null===(s=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===s?void 0:s["fx:items"];let r;if(i){const e={most_expensive_item:[...i].sort(((t,e)=>t.price-e.price))[0],count:i.length};r=t(h||(h=_` <foxy-i18n options="${0}" lang="${0}" key="transaction_summary" ns="${0}"> </foxy-i18n> `),JSON.stringify(e),this.lang,this.ns)}else r=t(p||(p=_`&ZeroWidthSpace;`));return t(u||(u=_` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),r,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const e=this.data,s=e?t(f||(f=_`${0} ${0} (${0})`),e.customer_first_name,e.customer_last_name,e.customer_email):t(v||(v=_`&ZeroWidthSpace;`));return t(y||(y=_` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),s,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",x);export{x as TransactionCard};
1
+ import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{h as t}from"./shared-dc73b9a5.js";import{C as e}from"./shared-85d45495.js";import{N as s}from"./shared-619adfad.js";import{T as i,a as r}from"./shared-f31044b8.js";import{c as a}from"./shared-4e709717.js";import"./shared-3e3c07ac.js";import"./shared-91b86bae.js";import"./shared-412670b8.js";import"./shared-ca0f14c1.js";import"./shared-3a7cf739.js";import"./shared-9803aa7c.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";let o,n,d,c,l,m,h,p,u,f,v,y,_=t=>t;const $=i(e(r(s,"transaction-card")));class x extends ${constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}render(){var e,s;const i=this.hiddenSelector,r=!i.matches("total",!0),d=!i.matches("status",!0);return t(o||(o=_` <div aria-busy="${0}" aria-live="polite" class="relative leading-m font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),r||d?t(n||(n=_` <div class="flex items-center justify-between"> ${0} ${0} </div> `),r?this.__renderTotal():"",d?this.__renderStatus():""):"",i.matches("description",!0)?"":this.__renderDescription(),i.matches("customer",!0)?"":this.__renderCustomer(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}async _sendGet(){const t=await super._sendGet(),e=await super._fetch(t._links["fx:store"].href);return this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",t}__renderTotal(){const e=this.data;let s;if(e){const i=`${e.total_order} ${e.currency_code}`,r=this.__currencyDisplay;s=t(d||(d=_` <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> `),JSON.stringify({amount:i,currencyDisplay:r}),this.lang,this.ns)}else s=t(c||(c=_`&ZeroWidthSpace;`));return t(l||(l=_` <div data-testid="total"> ${0} <div class="font-semibold truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),s,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var e,s,i,r;const a=(null===(e=this.data)||void 0===e?void 0:e.status)||"completed";return t(m||(m=_` <div data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-s"> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline text-l ${0}" title="${0}" icon="${0}"> </iron-icon> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:null===(s=this.data)||void 0===s?void 0:s.transaction_date}),this.lang,this.ns,null!==(i={completed:"text-success",rejected:"text-error",declined:"text-error"}[a])&&void 0!==i?i:"text-tertiary",this.t(`transaction_${a}`),null!==(r={completed:"icons:done-all",refunded:"icons:restore",rejected:"icons:highlight-off",declined:"icons:highlight-off",voided:"icons:remove-circle-outline"}[a])&&void 0!==r?r:"icons:schedule",this.renderTemplateOrSlot("status:after"))}__renderDescription(){var e,s;const i=null===(s=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===s?void 0:s["fx:items"];let r;if(i){const e={most_expensive_item:[...i].sort(((t,e)=>t.price-e.price))[0],count:i.length};r=t(h||(h=_` <foxy-i18n options="${0}" lang="${0}" key="transaction_summary" ns="${0}"> </foxy-i18n> `),JSON.stringify(e),this.lang,this.ns)}else r=t(p||(p=_`&ZeroWidthSpace;`));return t(u||(u=_` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),r,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const e=this.data,s=e?t(f||(f=_`${0} ${0} (${0})`),e.customer_first_name,e.customer_last_name,e.customer_email):t(v||(v=_`&ZeroWidthSpace;`));return t(y||(y=_` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),s,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",x);export{x as TransactionCard};
@@ -1 +1 @@
1
- import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-applied-tax-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-da130124.js";import"./shared-e25c676a.js";import{a as t,I as o}from"./shared-29dd9d87.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as r,c as e}from"./shared-dc73b9a5.js";import{i}from"./shared-9803aa7c.js";import"./shared-d539ee69.js";import"./shared-6c1aab74.js";import{_ as s}from"./shared-fadcb2e1.js";import{N as n}from"./shared-89dce718.js";import{a}from"./shared-33b47806.js";import{B as d}from"./shared-b772fbb1.js";import"./shared-4fc53390.js";import"./shared-fd001fd3.js";import"./shared-c13674cb.js";import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-30bb4828.js";import"./shared-4e709717.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-2b077e01.js";import"./shared-8936b109.js";import"./shared-32b15545.js";import"./shared-dbdc2a38.js";import"./shared-2caab7af.js";import"./shared-12f8034b.js";import"./shared-a64ead08.js";import"./shared-c5a638d1.js";import"./shared-99940888.js";import"./shared-8166ba00.js";import"./shared-4f8fe424.js";import"./shared-48ef8a04.js";import"./shared-9f9cdbb0.js";import"./shared-59796faa.js";import"./shared-f966bbc3.js";import"./foxy-address-card.js";import"./shared-d6dd67a5.js";import"./foxy-item-card.js";import"./shared-d673b138.js";import"./shared-2f186d21.js";import"./foxy-item-option-form.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-coupon-card.js";import"./shared-d6ed2e5c.js";import"./foxy-discount-builder.js";import"./shared-a0c6a159.js";import"./shared-f9f9ed5b.js";import"./shared-824f6e03.js";import"./shared-2061be9a.js";import"./shared-7ed7818e.js";import"./foxy-subscription-card.js";import"./shared-fcdc4903.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-95f4cffd.js";import"./shared-5f411ce2.js";import"./foxy-table.js";import"./shared-4473f0cf.js";import"./foxy-nucleon-element.js";import"./shared-75e34b5b.js";import"./shared-1bbd9b73.js";import"./shared-2f19b670.js";import"./foxy-pagination.js";import"./shared-0eb966c5.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-customer-form.js";import"./shared-b738ee96.js";import"./foxy-address-form.js";import"./shared-6eeb69e7.js";let l,c=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends t{renderControl(){var t,o,e,s;return r(l||(l=c` <foxy-internal-details summary="customer" infer="" open> <foxy-form-dialog header="header" infer="dialog" form="foxy-customer" href="${0}" id="dialog"> </foxy-form-dialog> <button class="w-full text-left block rounded-b-l transition-colors hover-bg-contrast-5 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <foxy-customer-card infer="card" class="p-m" href="${0}"> </foxy-customer-card> </button> </foxy-internal-details> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),i(null===(s=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===s?void 0:s._links["fx:customer"].href))}});let f,m=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return s(s({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,o="fail"===t?"error":"idle"===t?this.theme:"";return r(f||(f=m` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),o,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const o=new n.API(this),r=await o.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=r.ok?"idle":"fail",r.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let u,p,h,y,x,v=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends t{renderControl(){var t,o,e,i,s,n,a,d;return r(u||(u=v` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"])?this.__renderCaptureAction():"",(null===(i=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===i?void 0:i._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,o;return r(p||(p=v` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,o;return r(h||(h=v` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,o,e;return r(y||(y=v` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:void"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,o,e;return r(x||(x=v` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:refund"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}});let j,b,_,$,g,k,S,w=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends t{renderControl(){var t;return r(j||(j=w` <div class="border-t border-transparent"> <div class="h-m flex items-center justify-between"> <div class="text-xl font-bold">${0}</div> <div>${0}</div> </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} </div> `),this.__renderPrice(),(null===(t=this.nucleon)||void 0===t?void 0:t.data)?this.__renderStatus():"",this.__renderTotals())}__renderStatus(){var t,o;const e={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},i=(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o.status)||"completed";return r(b||(b=w` <foxy-i18n class="flex items-center h-xs px-s text-s font-semibold rounded ${0}" infer="" key="transaction_${0}"> </foxy-i18n> `),i in e?e[i]:"bg-contrast-5 text-contrast",i)}__renderPrice(){var t;const o=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==o?void 0:o.currency_code;if(!o)return r(_||(_=w`--`));const i={amount:`${o.total_order} ${e}`};return r($||($=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i)}__renderTotals(){var t;const o=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==o?void 0:o.currency_code;return["total_item_price","total_shipping","total_tax"].map((t=>{const i={amount:`${null==o?void 0:o[t]} ${e}`};return r(g||(g=w` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer=""></foxy-i18n> ${0} </div> `),t,o?r(k||(k=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i):r(S||(S=w`<span>--</span>`)))}))}});let A,E,C=t=>t;class T extends(a(o,"transaction")){static get styles(){return[...super.styles,e(A||(A=C`#body{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr))}#body>:first-child{grid-column-start:1;grid-column-end:-2}`))]}get readonlySelector(){var t,o,r;return Boolean(null!==(o=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==o?o:null===(r=this.data)||void 0===r?void 0:r._links["fx:refund"])?super.readonlySelector:new d(`${super.readonlySelector} attributes custom-fields`)}renderBody(){var t,o,e,s,n,a;return r(E||(E=C` <div id="body" class="gap-m"> <foxy-internal-async-details-control infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-async-details-control> <div class="grid gap-m self-start"> <foxy-internal-transaction-summary-control infer="summary"> </foxy-internal-transaction-summary-control> <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <foxy-internal-async-details-control infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),i(null===(o=this.data)||void 0===o?void 0:o._links["fx:payments"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href),i(null===(s=this.data)||void 0===s?void 0:s._links["fx:applied_taxes"].href),i(null===(n=this.data)||void 0===n?void 0:n._links["fx:custom_fields"].href),[this.href],i(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),[this.href])}}customElements.define("foxy-transaction",T);export{T as Transaction};
1
+ import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-applied-tax-card.js";import"./foxy-discount-card.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-form.js";import"./shared-2f0efb2c.js";import"./shared-68ab037d.js";import{a as t,I as o}from"./shared-9ef13805.js";import"./foxy-customer-card.js";import"./foxy-form-dialog.js";import"./foxy-customer.js";import{h as r,c as e}from"./shared-dc73b9a5.js";import{i}from"./shared-9803aa7c.js";import"./shared-71acf673.js";import"./shared-9ef81b37.js";import{_ as s}from"./shared-ca0f14c1.js";import{N as n}from"./shared-619adfad.js";import{a}from"./shared-f31044b8.js";import{B as d}from"./shared-3a7cf739.js";import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import"./shared-91b86bae.js";import"./shared-e1c1e8e2.js";import"./foxy-spinner.js";import"./shared-85d45495.js";import"./shared-4e709717.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-23fd456c.js";import"./shared-084b6372.js";import"./shared-c7280a24.js";import"./shared-4560425c.js";import"./shared-11f0daea.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-c63ba384.js";import"./shared-99940888.js";import"./shared-6f89d2e0.js";import"./shared-ec7cfc23.js";import"./shared-189dfb49.js";import"./shared-fd595d0a.js";import"./shared-80b90eec.js";import"./shared-2ca6d676.js";import"./foxy-address-card.js";import"./shared-a48a9dfc.js";import"./foxy-item-card.js";import"./shared-5482630e.js";import"./shared-4773b634.js";import"./foxy-item-option-form.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-option-card.js";import"./foxy-coupon-card.js";import"./shared-381aa7fe.js";import"./foxy-discount-builder.js";import"./shared-a0c6a159.js";import"./shared-f9f9ed5b.js";import"./shared-f2639daf.js";import"./shared-2061be9a.js";import"./shared-74a27421.js";import"./foxy-subscription-card.js";import"./shared-6ce2acfa.js";import"./foxy-subscription-form.js";import"./foxy-cancellation-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./shared-daa454bf.js";import"./shared-60c862aa.js";import"./foxy-table.js";import"./shared-d91ed0a8.js";import"./foxy-nucleon-element.js";import"./shared-023c287a.js";import"./shared-9be1a70f.js";import"./shared-fcbf9a41.js";import"./foxy-pagination.js";import"./shared-0eb966c5.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-customer-form.js";import"./shared-b738ee96.js";import"./foxy-address-form.js";import"./shared-5e43b817.js";let l,c=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends t{renderControl(){var t,o,e,s;return r(l||(l=c` <foxy-internal-details summary="customer" infer="" open> <foxy-form-dialog header="header" infer="dialog" form="foxy-customer" href="${0}" id="dialog"> </foxy-form-dialog> <button class="w-full text-left block rounded-b-l transition-colors hover-bg-contrast-5 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <foxy-customer-card infer="card" class="p-m" href="${0}"> </foxy-customer-card> </button> </foxy-internal-details> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:customer"].href),(t=>{this.renderRoot.querySelector("#dialog").show(t.currentTarget)}),i(null===(s=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===s?void 0:s._links["fx:customer"].href))}});let f,m=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return s(s({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,o="fail"===t?"error":"idle"===t?this.theme:"";return r(f||(f=m` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),o,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const o=new n.API(this),r=await o.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=r.ok?"idle":"fail",r.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let u,p,h,y,x,v=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends t{renderControl(){var t,o,e,i,s,n,a,d;return r(u||(u=v` <div class="divide-y divide-contrast-10"> ${0} ${0} ${0} ${0} </div> `),(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"])?this.__renderCaptureAction():"",(null===(i=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===i?void 0:i._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"")}__renderSendEmailsAction(){var t,o;return r(p||(p=v` <foxy-internal-transaction-post-action-control infer="send-emails" theme="contrast" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,o;return r(h||(h=v` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,o,e;return r(y||(y=v` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:void"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,o,e;return r(x||(x=v` <foxy-internal-transaction-post-action-control theme="contrast" infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),i(null===(e=null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o._links["fx:refund"])||void 0===e?void 0:e.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}});let j,_,b,$,g,k,S,w=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends t{renderControl(){var t;return r(j||(j=w` <div class="border-t border-transparent"> <div class="h-m flex items-center justify-between"> <div class="text-xl font-bold">${0}</div> <div>${0}</div> </div> <div class="border-t border-contrast-10 mb-s"></div> ${0} </div> `),this.__renderPrice(),(null===(t=this.nucleon)||void 0===t?void 0:t.data)?this.__renderStatus():"",this.__renderTotals())}__renderStatus(){var t,o;const e={authorized:"bg-success text-success-contrast",completed:"bg-success text-success-contrast",declined:"bg-error text-error-contrast",rejected:"bg-error text-error-contrast"},i=(null===(o=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===o?void 0:o.status)||"completed";return r(_||(_=w` <foxy-i18n class="flex items-center h-xs px-s text-s font-semibold rounded ${0}" infer="" key="transaction_${0}"> </foxy-i18n> `),i in e?e[i]:"bg-contrast-5 text-contrast",i)}__renderPrice(){var t;const o=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==o?void 0:o.currency_code;if(!o)return r(b||(b=w`--`));const i={amount:`${o.total_order} ${e}`};return r($||($=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i)}__renderTotals(){var t;const o=null===(t=this.nucleon)||void 0===t?void 0:t.data,e=null==o?void 0:o.currency_code;return["total_item_price","total_shipping","total_tax"].map((t=>{const i={amount:`${null==o?void 0:o[t]} ${e}`};return r(g||(g=w` <div class="flex justify-between text-m text-secondary"> <foxy-i18n key="${0}" infer=""></foxy-i18n> ${0} </div> `),t,o?r(k||(k=w`<foxy-i18n infer="" key="price" .options="${0}"></foxy-i18n>`),i):r(S||(S=w`<span>--</span>`)))}))}});let A,E,C=t=>t;class T extends(a(o,"transaction")){static get styles(){return[...super.styles,e(A||(A=C`#body{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr))}#body>:first-child{grid-column-start:1;grid-column-end:-2}`))]}get readonlySelector(){var t,o,r;return Boolean(null!==(o=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==o?o:null===(r=this.data)||void 0===r?void 0:r._links["fx:refund"])?super.readonlySelector:new d(`${super.readonlySelector} attributes custom-fields`)}renderBody(){var t,o,e,s,n,a;return r(E||(E=C` <div id="body" class="gap-m"> <foxy-internal-async-details-control infer="shipments" first="${0}" item="foxy-shipment-card" open> </foxy-internal-async-details-control> <div class="grid gap-m self-start"> <foxy-internal-transaction-summary-control infer="summary"> </foxy-internal-transaction-summary-control> <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <foxy-internal-async-details-control infer="payments" class="max-w-full overflow-hidden" first="${0}" limit="1" item="foxy-payment-card" open> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="discounts" first="${0}" limit="5" item="foxy-discount-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="applied-taxes" first="${0}" limit="5" item="foxy-applied-tax-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="custom-fields" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-async-details-control infer="attributes" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" .related="${0}"> </foxy-internal-async-details-control> <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> </div> </div> `),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:shipments"].href),i(null===(o=this.data)||void 0===o?void 0:o._links["fx:payments"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:discounts"].href),i(null===(s=this.data)||void 0===s?void 0:s._links["fx:applied_taxes"].href),i(null===(n=this.data)||void 0===n?void 0:n._links["fx:custom_fields"].href),[this.href],i(null===(a=this.data)||void 0===a?void 0:a._links["fx:attributes"].href),[this.href])}}customElements.define("foxy-transaction",T);export{T as Transaction};
@@ -1 +1 @@
1
- import"./shared-4fc53390.js";import"./shared-fd001fd3.js";import"./foxy-spinner.js";import"./shared-da130124.js";import{T as s}from"./shared-2f19b670.js";export{T as TransactionsTable}from"./shared-2f19b670.js";import"./shared-c13674cb.js";import"./shared-33b47806.js";import"./shared-fadcb2e1.js";import"./shared-dc73b9a5.js";import"./shared-b772fbb1.js";import"./shared-4473f0cf.js";import"./shared-30bb4828.js";import"./shared-9803aa7c.js";import"./foxy-nucleon-element.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-4e709717.js";customElements.define("foxy-transactions-table",s);
1
+ import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{T as s}from"./shared-fcbf9a41.js";export{T as TransactionsTable}from"./shared-fcbf9a41.js";import"./shared-91b86bae.js";import"./shared-f31044b8.js";import"./shared-ca0f14c1.js";import"./shared-dc73b9a5.js";import"./shared-3a7cf739.js";import"./shared-d91ed0a8.js";import"./shared-85d45495.js";import"./shared-9803aa7c.js";import"./foxy-nucleon-element.js";import"./shared-619adfad.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-4e709717.js";customElements.define("foxy-transactions-table",s);
@@ -1 +1 @@
1
- import"./shared-32b15545.js";import"./shared-d539ee69.js";import"./shared-6c1aab74.js";import"./foxy-spinner.js";import"./shared-da130124.js";export{U as UserForm}from"./shared-0b9c755c.js";import"./shared-8936b109.js";import"./shared-c13674cb.js";import"./shared-33b47806.js";import"./shared-fadcb2e1.js";import"./shared-dc73b9a5.js";import"./shared-8166ba00.js";import"./shared-16d10bca.js";import"./shared-b772fbb1.js";import"./shared-30bb4828.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-fd001fd3.js";import"./shared-4fc53390.js";import"./shared-e06de519.js";import"./shared-dbdc2a38.js";import"./shared-2caab7af.js";import"./shared-12f8034b.js";import"./shared-a64ead08.js";import"./shared-2b077e01.js";import"./shared-c5a638d1.js";import"./shared-99940888.js";import"./shared-e6a7b2f1.js";import"./shared-4f8fe424.js";import"./shared-48ef8a04.js";import"./shared-89dce718.js";import"./shared-7684cb05.js";import"./shared-b738ee96.js";
1
+ import"./shared-c7280a24.js";import"./shared-71acf673.js";import"./shared-9ef81b37.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";export{U as UserForm}from"./shared-6af95088.js";import"./shared-084b6372.js";import"./shared-91b86bae.js";import"./shared-f31044b8.js";import"./shared-ca0f14c1.js";import"./shared-dc73b9a5.js";import"./shared-6f89d2e0.js";import"./shared-9b392ba8.js";import"./shared-3a7cf739.js";import"./shared-85d45495.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-3e3c07ac.js";import"./shared-412670b8.js";import"./shared-ff1d9854.js";import"./shared-4560425c.js";import"./shared-11f0daea.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-23fd456c.js";import"./shared-c63ba384.js";import"./shared-99940888.js";import"./shared-4c0520f6.js";import"./shared-ec7cfc23.js";import"./shared-189dfb49.js";import"./shared-619adfad.js";import"./shared-7684cb05.js";import"./shared-b738ee96.js";
@@ -1 +1 @@
1
- import"./shared-d539ee69.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-0b9c755c.js";import"./foxy-spinner.js";import"./shared-da130124.js";import{h as e}from"./shared-dc73b9a5.js";import{T as a}from"./shared-4473f0cf.js";import{a as t}from"./shared-33b47806.js";import"./shared-8936b109.js";import"./shared-c13674cb.js";import"./shared-6c1aab74.js";import"./shared-fadcb2e1.js";import"./shared-8166ba00.js";import"./shared-16d10bca.js";import"./shared-b772fbb1.js";import"./shared-30bb4828.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-7684cb05.js";import"./shared-32b15545.js";import"./shared-e06de519.js";import"./shared-fd001fd3.js";import"./shared-dbdc2a38.js";import"./shared-2caab7af.js";import"./shared-12f8034b.js";import"./shared-a64ead08.js";import"./shared-2b077e01.js";import"./shared-c5a638d1.js";import"./shared-99940888.js";import"./shared-e6a7b2f1.js";import"./shared-4f8fe424.js";import"./shared-48ef8a04.js";import"./shared-89dce718.js";import"./shared-b738ee96.js";import"./shared-4fc53390.js";import"./foxy-nucleon-element.js";let r,o,d,i,m,n,l,p=s=>s;class f extends(t(a,"users-table")){constructor(){super(...arguments),this.columns=[f.nameColumn,f.emailColumn,f.rolesColumn,f.lastUpdatedColumn,f.actionsColumn]}render(){return e(r||(r=p` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}f.nameColumn={cell:s=>e(o||(o=p` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),s.data.first_name,s.data.last_name)},f.emailColumn={hideBelow:"md",cell:s=>e(d||(d=p` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),s.data.email)},f.rolesColumn={cell:a=>e(i||(i=p` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((t=>e(m||(m=p` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),a.data[t]?"":"text-disabled",s.find((s=>s.property===t)).icon))))},f.lastUpdatedColumn={hideBelow:"lg",cell:s=>e(n||(n=p` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:s.data.date_modified}),s.lang,s.ns,JSON.stringify({value:s.data.date_modified}),s.lang,s.ns)},f.actionsColumn={cell:s=>e(l||(l=p` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(e=>{const a=e.target,t=a.getRootNode().querySelector("#form");t.href=s.data._links.self.href,t.show(a)}),s.lang,s.ns)},customElements.define("foxy-users-table",f);export{f as UsersTable};
1
+ import"./shared-71acf673.js";import"./foxy-form-dialog.js";import{r as s}from"./shared-6af95088.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import{h as a}from"./shared-dc73b9a5.js";import{T as e}from"./shared-d91ed0a8.js";import{a as t}from"./shared-f31044b8.js";import"./shared-084b6372.js";import"./shared-91b86bae.js";import"./shared-9ef81b37.js";import"./shared-ca0f14c1.js";import"./shared-6f89d2e0.js";import"./shared-9b392ba8.js";import"./shared-3a7cf739.js";import"./shared-85d45495.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-7684cb05.js";import"./shared-c7280a24.js";import"./shared-ff1d9854.js";import"./shared-3e3c07ac.js";import"./shared-4560425c.js";import"./shared-11f0daea.js";import"./shared-901ca702.js";import"./shared-fe68657a.js";import"./shared-23fd456c.js";import"./shared-c63ba384.js";import"./shared-99940888.js";import"./shared-4c0520f6.js";import"./shared-ec7cfc23.js";import"./shared-189dfb49.js";import"./shared-619adfad.js";import"./shared-b738ee96.js";import"./shared-412670b8.js";import"./foxy-nucleon-element.js";let r,o,d,i,m,n,l,p=s=>s;class f extends(t(e,"users-table")){constructor(){super(...arguments),this.columns=[f.nameColumn,f.emailColumn,f.rolesColumn,f.lastUpdatedColumn,f.actionsColumn]}render(){return a(r||(r=p` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}f.nameColumn={cell:s=>a(o||(o=p` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),s.data.first_name,s.data.last_name)},f.emailColumn={hideBelow:"md",cell:s=>a(d||(d=p` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),s.data.email)},f.rolesColumn={cell:e=>a(i||(i=p` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((t=>a(m||(m=p` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),e.data[t]?"":"text-disabled",s.find((s=>s.property===t)).icon))))},f.lastUpdatedColumn={hideBelow:"lg",cell:s=>a(n||(n=p` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:s.data.date_modified}),s.lang,s.ns,JSON.stringify({value:s.data.date_modified}),s.lang,s.ns)},f.actionsColumn={cell:s=>a(l||(l=p` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(a=>{const e=a.target,t=e.getRootNode().querySelector("#form");t.href=s.data._links.self.href,t.show(e)}),s.lang,s.ns)},customElements.define("foxy-users-table",f);export{f as UsersTable};
@@ -1 +1 @@
1
- import"./shared-4fc53390.js";import"./shared-fd001fd3.js";import{I as s}from"./shared-d673b138.js";import{h as e}from"./shared-dc73b9a5.js";import{a as i}from"./shared-33b47806.js";import"./shared-c13674cb.js";import"./foxy-spinner.js";import"./shared-da130124.js";import"./shared-fadcb2e1.js";import"./shared-b772fbb1.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-4e709717.js";let a,r=s=>s;class o extends(i(s,"webhook-card")){renderBody(){var s,i,o,t;return e(a||(a=r` <div class="grid grid-cols-1 gap-s leading-none"> <p class="flex justify-between items-center font-semibold"> <span class="truncate">${0}&ZeroWidthSpace;</span> <span class="uppercase inline-block text-xs bg-contrast-5 rounded p-xs flex-shrink-0"> ${0}&ZeroWidthSpace; </span> </p> <div class="flex items-center gap-s text-secondary"> <iron-icon class="icon-inline flex-shrink-0" icon="icons:language"></iron-icon> <p class="truncate">${0}&ZeroWidthSpace;</p> </div> <div class="flex items-center gap-s text-secondary"> <iron-icon class="icon-inline flex-shrink-0" icon="icons:settings-input-antenna"> </iron-icon> <p class="truncate">${0}&ZeroWidthSpace;</p> </div> </div> `),null===(s=this.data)||void 0===s?void 0:s.name,null===(i=this.data)||void 0===i?void 0:i.format,null===(o=this.data)||void 0===o?void 0:o.url,null===(t=this.data)||void 0===t?void 0:t.event_resource)}}customElements.define("foxy-webhook-card",o);export{o as WebhookCard};
1
+ import"./shared-412670b8.js";import"./shared-3e3c07ac.js";import{I as s}from"./shared-5482630e.js";import{h as e}from"./shared-dc73b9a5.js";import{a}from"./shared-f31044b8.js";import"./shared-91b86bae.js";import"./foxy-spinner.js";import"./shared-2f0efb2c.js";import"./shared-ca0f14c1.js";import"./shared-3a7cf739.js";import"./shared-619adfad.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-4e709717.js";let i,r=s=>s;class o extends(a(s,"webhook-card")){renderBody(){var s,a,o,t;return e(i||(i=r` <div class="grid grid-cols-1 gap-s leading-none"> <p class="flex justify-between items-center font-semibold"> <span class="truncate">${0}&ZeroWidthSpace;</span> <span class="uppercase inline-block text-xs bg-contrast-5 rounded p-xs flex-shrink-0"> ${0}&ZeroWidthSpace; </span> </p> <div class="flex items-center gap-s text-secondary"> <iron-icon class="icon-inline flex-shrink-0" icon="icons:language"></iron-icon> <p class="truncate">${0}&ZeroWidthSpace;</p> </div> <div class="flex items-center gap-s text-secondary"> <iron-icon class="icon-inline flex-shrink-0" icon="icons:settings-input-antenna"> </iron-icon> <p class="truncate">${0}&ZeroWidthSpace;</p> </div> </div> `),null===(s=this.data)||void 0===s?void 0:s.name,null===(a=this.data)||void 0===a?void 0:a.format,null===(o=this.data)||void 0===o?void 0:o.url,null===(t=this.data)||void 0===t?void 0:t.event_resource)}}customElements.define("foxy-webhook-card",o);export{o as WebhookCard};
@@ -1,4 +1,4 @@
1
- import"./shared-e25c676a.js";import{E as e,C as t,T as r,D as o}from"./shared-8936b109.js";import{h as i,G as s,P as a}from"./shared-c13674cb.js";import"./shared-32b15545.js";import{F as n}from"./shared-fd001fd3.js";import{I as l}from"./shared-2f186d21.js";import"./shared-da130124.js";import{_ as d}from"./shared-fadcb2e1.js";import{i as h}from"./shared-9803aa7c.js";import{h as c}from"./shared-dc73b9a5.js";import{I as u}from"./shared-29dd9d87.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as p}from"./shared-33b47806.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-4fc53390.js";import"./shared-b772fbb1.js";import"./shared-30bb4828.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-form-dialog.js";import"./shared-6c1aab74.js";import"./shared-d539ee69.js";import"./shared-8166ba00.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-e1c1e8e2.js";import"./shared-d673b138.js";const b=i`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
1
+ import"./shared-68ab037d.js";import{E as e,C as t,T as r,D as o}from"./shared-084b6372.js";import{h as i,G as s,P as a}from"./shared-91b86bae.js";import"./shared-c7280a24.js";import{F as n}from"./shared-3e3c07ac.js";import{I as l}from"./shared-4773b634.js";import"./shared-2f0efb2c.js";import{_ as d}from"./shared-ca0f14c1.js";import{i as h}from"./shared-9803aa7c.js";import{h as c}from"./shared-dc73b9a5.js";import{I as u}from"./shared-9ef13805.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{a as p}from"./shared-f31044b8.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-412670b8.js";import"./shared-3a7cf739.js";import"./shared-85d45495.js";import"./shared-619adfad.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-form-dialog.js";import"./shared-9ef81b37.js";import"./shared-71acf673.js";import"./shared-6f89d2e0.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-e1c1e8e2.js";import"./shared-5482630e.js";const m=i`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -122,13 +122,13 @@ import"./shared-e25c676a.js";import{E as e,C as t,T as r,D as o}from"./shared-89
122
122
  }
123
123
  </style>
124
124
  </template>
125
- </dom-module>`;document.head.appendChild(b.content);
125
+ </dom-module>`;document.head.appendChild(m.content);
126
126
  /**
127
127
  @license
128
128
  Copyright (c) 2017 Vaadin Ltd.
129
129
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
130
130
  */
131
- class m extends(e(t(r(s(a))))){static get template(){return i`
131
+ class b extends(e(t(r(s(a))))){static get template(){return i`
132
132
  <style>
133
133
  :host {
134
134
  display: inline-block;
@@ -172,7 +172,7 @@ class m extends(e(t(r(s(a))))){static get template(){return i`
172
172
  <slot></slot>
173
173
  </span>
174
174
  </label>
175
- `}static get is(){return"vaadin-radio-button"}static get version(){return"1.5.4"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},name:String,value:{type:String,value:"on"}}}get name(){return this.checked?this._storedName:""}set name(e){this._storedName=e}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),/^(disabled|checked)$/.test(e)){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&this.shadowRoot&&parseInt(navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1],10)){const e="-webkit-backface-visibility";this.shadowRoot.querySelectorAll("*").forEach((t=>{t.style[e]="visible",t.style[e]=""}))}}}ready(){super.ready(),this.setAttribute("role","radio"),this._addListeners();const e=this.getAttribute("name");e&&(this.name=e),this.shadowRoot.querySelector('[part~="label"]').querySelector("slot").addEventListener("slotchange",this._updateLabelAttribute.bind(this)),this._updateLabelAttribute()}_updateLabelAttribute(){const e=this.shadowRoot.querySelector('[part~="label"]'),t=e.firstElementChild.assignedNodes();this._isAssignedNodesEmpty(t)?e.setAttribute("empty",""):e.removeAttribute("empty")}_isAssignedNodesEmpty(e){return 0===e.length||1==e.length&&e[0].nodeType==Node.TEXT_NODE&&""===e[0].textContent.trim()}_checkedChanged(e){this.setAttribute("aria-checked",e)}_addListeners(){this._addEventListenerToNode(this,"down",(e=>{this.disabled||this.setAttribute("active","")})),this._addEventListenerToNode(this,"up",(e=>{this.removeAttribute("active"),this.checked||this.disabled||this.click()})),this.addEventListener("keydown",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.setAttribute("active",""))})),this.addEventListener("keyup",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.click(),this.removeAttribute("active"))}))}click(){this.disabled||this.shadowRoot.querySelector("input").dispatchEvent(new MouseEvent("click"))}get focusElement(){return this.shadowRoot.querySelector("input")}_onChange(e){this.checked=e.target.checked;const t=new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable});this.dispatchEvent(t)}}customElements.define(m.is,m);const f=i`<dom-module id="lumo-radio-group" theme-for="vaadin-radio-group">
175
+ `}static get is(){return"vaadin-radio-button"}static get version(){return"1.5.4"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},name:String,value:{type:String,value:"on"}}}get name(){return this.checked?this._storedName:""}set name(e){this._storedName=e}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),/^(disabled|checked)$/.test(e)){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&this.shadowRoot&&parseInt(navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1],10)){const e="-webkit-backface-visibility";this.shadowRoot.querySelectorAll("*").forEach((t=>{t.style[e]="visible",t.style[e]=""}))}}}ready(){super.ready(),this.setAttribute("role","radio"),this._addListeners();const e=this.getAttribute("name");e&&(this.name=e),this.shadowRoot.querySelector('[part~="label"]').querySelector("slot").addEventListener("slotchange",this._updateLabelAttribute.bind(this)),this._updateLabelAttribute()}_updateLabelAttribute(){const e=this.shadowRoot.querySelector('[part~="label"]'),t=e.firstElementChild.assignedNodes();this._isAssignedNodesEmpty(t)?e.setAttribute("empty",""):e.removeAttribute("empty")}_isAssignedNodesEmpty(e){return 0===e.length||1==e.length&&e[0].nodeType==Node.TEXT_NODE&&""===e[0].textContent.trim()}_checkedChanged(e){this.setAttribute("aria-checked",e)}_addListeners(){this._addEventListenerToNode(this,"down",(e=>{this.disabled||this.setAttribute("active","")})),this._addEventListenerToNode(this,"up",(e=>{this.removeAttribute("active"),this.checked||this.disabled||this.click()})),this.addEventListener("keydown",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.setAttribute("active",""))})),this.addEventListener("keyup",(e=>{this.disabled||32!==e.keyCode||(e.preventDefault(),this.click(),this.removeAttribute("active"))}))}click(){this.disabled||this.shadowRoot.querySelector("input").dispatchEvent(new MouseEvent("click"))}get focusElement(){return this.shadowRoot.querySelector("input")}_onChange(e){this.checked=e.target.checked;const t=new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable});this.dispatchEvent(t)}}customElements.define(b.is,b);const f=i`<dom-module id="lumo-radio-group" theme-for="vaadin-radio-group">
176
176
  <template>
177
177
  <style include="lumo-required-field">
178
178
  :host {
@@ -315,4 +315,4 @@ class v extends(r(o(a))){static get template(){return i`
315
315
 
316
316
  <div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
317
317
  </div>
318
- `}static get is(){return"vaadin-radio-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},readonly:{type:Boolean,reflectToAttribute:!0,observer:"_readonlyChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},_errorId:{type:String},_helperTextId:{type:String},_hasSlottedHelper:Boolean,_checkedButton:{type:Object},label:{type:String,value:"",observer:"_labelChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},value:{type:String,notify:!0,observer:"_valueChanged"}}}ready(){super.ready(),this._addListeners(),this._observer=new n(this,(e=>{const t=e=>{e.target.checked&&this._changeSelectedButton(e.target)};this._filterRadioButtons(e.addedNodes).reverse().forEach((e=>{e.addEventListener("checked-changed",t),this.disabled&&(e.disabled=!0),e.checked&&this._changeSelectedButton(e)})),this._filterRadioButtons(e.removedNodes).forEach((e=>{e.removeEventListener("checked-changed",t),e==this._checkedButton&&(this.value=void 0)})),this._setOrToggleHasHelperAttribute()})),this._radioButtons.length&&this._setFocusable(0),this.setAttribute("role","radiogroup");const e=v._uniqueId=1+v._uniqueId||0;this._errorId=`${this.constructor.is}-error-${e}`,this._helperTextId=`${this.constructor.is}-helper-${e}`}get _radioButtons(){return this._filterRadioButtons(this.querySelectorAll("*"))}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_filterRadioButtons(e){return Array.from(e).filter((e=>e instanceof m))}_disabledChanged(e){this.setAttribute("aria-disabled",e),this._updateDisableButtons()}_updateDisableButtons(){this._radioButtons.forEach((e=>{this.disabled?e.disabled=!0:this.readonly?e.disabled=e!==this._checkedButton&&this.readonly:e.disabled=!1}))}_readonlyChanged(e,t){(e||t)&&this._updateDisableButtons()}_addListeners(){this.addEventListener("keydown",(e=>{var t=e.target==this?this._checkedButton:e.target;const r="rtl"===this.getAttribute("dir")&&"vertical"!==this.theme;37!==e.keyCode&&38!==e.keyCode||(e.preventDefault(),this._selectIncButton(r,t)),39!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),this._selectIncButton(!r,t))})),this.addEventListener("focusin",(()=>this._setFocused(this._containsFocus()))),this.addEventListener("focusout",(e=>{e.composed&&this.validate(),this._setFocused(!1)}))}_selectIncButton(e,t){e?this._selectNextButton(t):this._selectPreviousButton(t)}_selectButton(e,t){this._containsFocus()&&(e.focus(),t&&e.setAttribute("focus-ring","")),this._changeSelectedButton(e,t)}_containsFocus(){const e=this.getRootNode(),t=void 0!==e._activeElement?e._activeElement:e.activeElement;return this.contains(t)}_hasEnabledButtons(){return!this._radioButtons.every((e=>e.disabled))}_selectNextButton(e){if(this._hasEnabledButtons()){var t=e.nextElementSibling||this.firstElementChild;t.disabled?this._selectNextButton(t):this._selectButton(t,!0)}}_selectPreviousButton(e){if(this._hasEnabledButtons()){var t=e.previousElementSibling||this.lastElementChild;t.disabled?this._selectPreviousButton(t):this._selectButton(t,!0)}}_changeSelectedButton(e,t){this._checkedButton!==e&&(this._checkedButton=e,this._checkedButton&&(this.value=this._checkedButton.value),this._radioButtons.forEach((e=>{e===this._checkedButton?t?e.click():e.checked=!0:e.checked=!1})),this.validate(),this.readonly&&this._updateDisableButtons(),e&&this._setFocusable(this._radioButtons.indexOf(e)))}_valueChanged(e,t){if(t&&(""===e||null==e))return this._changeSelectedButton(null),void this.removeAttribute("has-value");if(!this._checkedButton||e!=this._checkedButton.value){const t=this._radioButtons.filter((t=>t.value==e))[0];this._selectButton(t)}this._checkedButton?this.setAttribute("has-value",""):console.warn(`No <vaadin-radio-button> with value ${e} found.`)}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){return!this.required||!!this.value}_setFocusable(e){const t=this._radioButtons;t.forEach((r=>r.tabindex=r===t[e]?0:-1))}_labelChanged(e){this._setOrToggleAttribute("has-label",!!e)}_errorMessageChanged(e){this._setOrToggleAttribute("has-error-message",!!e)}_helperTextChanged(e){this._setOrToggleAttribute("has-helper",!!e)}_setOrToggleAttribute(e,t){e&&(t?this.setAttribute(e,"boolean"==typeof t?"":t):this.removeAttribute(e))}_setOrToggleHasHelperAttribute(){const e=this.shadowRoot.querySelector('[name="helper"]').assignedNodes();this._hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this._setOrToggleAttribute("has-helper",this._hasSlottedHelper?"slotted":!!this.helperText)}_getActiveErrorId(e,t,r){return t&&e?r:void 0}_getErrorMessageAriaHidden(e,t,r){return(!this._getActiveErrorId(e,t,r)).toString()}_getHelperTextAriaHidden(e,t,r){return(!(e||r)).toString()}}customElements.define(v.is,v);let g,y,_=e=>e;customElements.define("foxy-internal-radio-group-control",class extends l{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return d(d({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e;return c(g||(g=_` <vaadin-radio-group error-message="${0}" helper-text="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" .checkValidity="${0}" .value="${0}" @change="${0}"> ${0} </vaadin-radio-group> `),h(this._errorMessage),this.helperText,this.label,h(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled||this.readonly,this._checkValidity,this._value,(e=>{const t=e.currentTarget;this._value=t.value}),this.options.map((e=>c(y||(y=_` <vaadin-radio-button value="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-radio-button> `),e.value,e.label))))}});let x,k,B=e=>e;class E extends(p(u,"webhook-form")){constructor(){super(...arguments),this.__formats=[{value:"json",label:"JSON"},{value:"webflow",label:"Webflow"},{value:"zapier",label:"Zapier"}],this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({version:e})=>!!e||"version:v8n_required",({format:e})=>!!e||"format:v8n_required",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}renderBody(){return c(x||(x=B` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="event-resource" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="query"></foxy-internal-text-control> <foxy-internal-text-control infer="url"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="format" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="encryption-key"></foxy-internal-text-control> <foxy-internal-text-control infer="version"></foxy-internal-text-control> ${0} ${0} `),this.__eventResources,this.__formats,this.data?c(k||(k=B` <foxy-internal-async-details-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-async-details-control> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",E);export{E as WebhookForm};
318
+ `}static get is(){return"vaadin-radio-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},readonly:{type:Boolean,reflectToAttribute:!0,observer:"_readonlyChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},_errorId:{type:String},_helperTextId:{type:String},_hasSlottedHelper:Boolean,_checkedButton:{type:Object},label:{type:String,value:"",observer:"_labelChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},value:{type:String,notify:!0,observer:"_valueChanged"}}}ready(){super.ready(),this._addListeners(),this._observer=new n(this,(e=>{const t=e=>{e.target.checked&&this._changeSelectedButton(e.target)};this._filterRadioButtons(e.addedNodes).reverse().forEach((e=>{e.addEventListener("checked-changed",t),this.disabled&&(e.disabled=!0),e.checked&&this._changeSelectedButton(e)})),this._filterRadioButtons(e.removedNodes).forEach((e=>{e.removeEventListener("checked-changed",t),e==this._checkedButton&&(this.value=void 0)})),this._setOrToggleHasHelperAttribute()})),this._radioButtons.length&&this._setFocusable(0),this.setAttribute("role","radiogroup");const e=v._uniqueId=1+v._uniqueId||0;this._errorId=`${this.constructor.is}-error-${e}`,this._helperTextId=`${this.constructor.is}-helper-${e}`}get _radioButtons(){return this._filterRadioButtons(this.querySelectorAll("*"))}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_filterRadioButtons(e){return Array.from(e).filter((e=>e instanceof b))}_disabledChanged(e){this.setAttribute("aria-disabled",e),this._updateDisableButtons()}_updateDisableButtons(){this._radioButtons.forEach((e=>{this.disabled?e.disabled=!0:this.readonly?e.disabled=e!==this._checkedButton&&this.readonly:e.disabled=!1}))}_readonlyChanged(e,t){(e||t)&&this._updateDisableButtons()}_addListeners(){this.addEventListener("keydown",(e=>{var t=e.target==this?this._checkedButton:e.target;const r="rtl"===this.getAttribute("dir")&&"vertical"!==this.theme;37!==e.keyCode&&38!==e.keyCode||(e.preventDefault(),this._selectIncButton(r,t)),39!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),this._selectIncButton(!r,t))})),this.addEventListener("focusin",(()=>this._setFocused(this._containsFocus()))),this.addEventListener("focusout",(e=>{e.composed&&this.validate(),this._setFocused(!1)}))}_selectIncButton(e,t){e?this._selectNextButton(t):this._selectPreviousButton(t)}_selectButton(e,t){this._containsFocus()&&(e.focus(),t&&e.setAttribute("focus-ring","")),this._changeSelectedButton(e,t)}_containsFocus(){const e=this.getRootNode(),t=void 0!==e._activeElement?e._activeElement:e.activeElement;return this.contains(t)}_hasEnabledButtons(){return!this._radioButtons.every((e=>e.disabled))}_selectNextButton(e){if(this._hasEnabledButtons()){var t=e.nextElementSibling||this.firstElementChild;t.disabled?this._selectNextButton(t):this._selectButton(t,!0)}}_selectPreviousButton(e){if(this._hasEnabledButtons()){var t=e.previousElementSibling||this.lastElementChild;t.disabled?this._selectPreviousButton(t):this._selectButton(t,!0)}}_changeSelectedButton(e,t){this._checkedButton!==e&&(this._checkedButton=e,this._checkedButton&&(this.value=this._checkedButton.value),this._radioButtons.forEach((e=>{e===this._checkedButton?t?e.click():e.checked=!0:e.checked=!1})),this.validate(),this.readonly&&this._updateDisableButtons(),e&&this._setFocusable(this._radioButtons.indexOf(e)))}_valueChanged(e,t){if(t&&(""===e||null==e))return this._changeSelectedButton(null),void this.removeAttribute("has-value");if(!this._checkedButton||e!=this._checkedButton.value){const t=this._radioButtons.filter((t=>t.value==e))[0];this._selectButton(t)}this._checkedButton?this.setAttribute("has-value",""):console.warn(`No <vaadin-radio-button> with value ${e} found.`)}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){return!this.required||!!this.value}_setFocusable(e){const t=this._radioButtons;t.forEach((r=>r.tabindex=r===t[e]?0:-1))}_labelChanged(e){this._setOrToggleAttribute("has-label",!!e)}_errorMessageChanged(e){this._setOrToggleAttribute("has-error-message",!!e)}_helperTextChanged(e){this._setOrToggleAttribute("has-helper",!!e)}_setOrToggleAttribute(e,t){e&&(t?this.setAttribute(e,"boolean"==typeof t?"":t):this.removeAttribute(e))}_setOrToggleHasHelperAttribute(){const e=this.shadowRoot.querySelector('[name="helper"]').assignedNodes();this._hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this._setOrToggleAttribute("has-helper",this._hasSlottedHelper?"slotted":!!this.helperText)}_getActiveErrorId(e,t,r){return t&&e?r:void 0}_getErrorMessageAriaHidden(e,t,r){return(!this._getActiveErrorId(e,t,r)).toString()}_getHelperTextAriaHidden(e,t,r){return(!(e||r)).toString()}}customElements.define(v.is,v);let g,y,_=e=>e;customElements.define("foxy-internal-radio-group-control",class extends l{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return d(d({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e;return c(g||(g=_` <vaadin-radio-group error-message="${0}" helper-text="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" .checkValidity="${0}" .value="${0}" @change="${0}"> ${0} </vaadin-radio-group> `),h(this._errorMessage),this.helperText,this.label,h(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled||this.readonly,this._checkValidity,this._value,(e=>{const t=e.currentTarget;this._value=t.value}),this.options.map((e=>c(y||(y=_` <vaadin-radio-button value="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-radio-button> `),e.value,e.label))))}});let x,k,B=e=>e;class E extends(p(u,"webhook-form")){constructor(){super(...arguments),this.__formats=[{value:"json",label:"JSON"},{value:"webflow",label:"Webflow"},{value:"zapier",label:"Zapier"}],this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({version:e})=>!!e||"version:v8n_required",({format:e})=>!!e||"format:v8n_required",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}renderBody(){return c(x||(x=B` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="event-resource" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="query"></foxy-internal-text-control> <foxy-internal-text-control infer="url"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="format" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="encryption-key"></foxy-internal-text-control> <foxy-internal-text-control infer="version"></foxy-internal-text-control> ${0} ${0} `),this.__eventResources,this.__formats,this.data?c(k||(k=B` <foxy-internal-async-details-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-async-details-control> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",E);export{E as WebhookForm};
@@ -1 +1 @@
1
- import"./shared-da130124.js";import{I as e}from"./shared-d673b138.js";import{a as s}from"./shared-33b47806.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-fadcb2e1.js";import"./shared-b772fbb1.js";import"./foxy-spinner.js";import"./shared-fd001fd3.js";import"./shared-c13674cb.js";import"./shared-4fc53390.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";import"./shared-4e709717.js";let o,a=e=>e;class t extends(s(e,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:t,response_body:d}=null!==(e=this.data)&&void 0!==e?e:{};return r(o||(o=a` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-semibold"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}&ZeroWidthSpace; </span> </p> <p class="text-tertiary">${0}&ZeroWidthSpace;</p> </div> `),{value:s},t,d)}}customElements.define("foxy-webhook-log-card",t);export{t as WebhookLogCard};
1
+ import"./shared-2f0efb2c.js";import{I as e}from"./shared-5482630e.js";import{a as s}from"./shared-f31044b8.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-ca0f14c1.js";import"./shared-3a7cf739.js";import"./foxy-spinner.js";import"./shared-3e3c07ac.js";import"./shared-91b86bae.js";import"./shared-412670b8.js";import"./shared-619adfad.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";import"./shared-4e709717.js";let a,o=e=>e;class t extends(s(e,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:t,response_body:d}=null!==(e=this.data)&&void 0!==e?e:{};return r(a||(a=o` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-semibold"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}&ZeroWidthSpace; </span> </p> <p class="text-tertiary">${0}&ZeroWidthSpace;</p> </div> `),{value:s},t,d)}}customElements.define("foxy-webhook-log-card",t);export{t as WebhookLogCard};
@@ -1 +1 @@
1
- import"./shared-da130124.js";import{I as s}from"./shared-d673b138.js";import{a as e}from"./shared-33b47806.js";import{h as t}from"./shared-dc73b9a5.js";import{c as r}from"./shared-4e709717.js";import"./shared-fadcb2e1.js";import"./shared-b772fbb1.js";import"./foxy-spinner.js";import"./shared-fd001fd3.js";import"./shared-c13674cb.js";import"./shared-4fc53390.js";import"./shared-89dce718.js";import"./shared-16d10bca.js";import"./shared-7684cb05.js";import"./shared-e6a7b2f1.js";let a,o=s=>s;const d=e(s,"webhook-status-card");class i extends d{renderBody(){var s,e;const d=null===(s=this.data)||void 0===s?void 0:s.status;return t(a||(a=o` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-semibold" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},r({"text-error":"failed"===d,"text-tertiary":"pending"===d,"text-success":"successful"===d}),d)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
1
+ import"./shared-2f0efb2c.js";import{I as s}from"./shared-5482630e.js";import{a as e}from"./shared-f31044b8.js";import{h as t}from"./shared-dc73b9a5.js";import{c as r}from"./shared-4e709717.js";import"./shared-ca0f14c1.js";import"./shared-3a7cf739.js";import"./foxy-spinner.js";import"./shared-3e3c07ac.js";import"./shared-91b86bae.js";import"./shared-412670b8.js";import"./shared-619adfad.js";import"./shared-9b392ba8.js";import"./shared-7684cb05.js";import"./shared-4c0520f6.js";let a,o=s=>s;const i=e(s,"webhook-status-card");class d extends i{renderBody(){var s,e;const i=null===(s=this.data)||void 0===s?void 0:s.status;return t(a||(a=o` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-semibold" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},r({"text-error":"failed"===i,"text-tertiary":"pending"===i,"text-success":"successful"===i}),i)}}customElements.define("foxy-webhook-status-card",d);export{d as WebhookStatusCard};
@@ -1 +1 @@
1
- import{A as e,a8 as t}from"./shared-b772fbb1.js";import{d as s}from"./shared-fadcb2e1.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
1
+ import{A as e,a8 as t}from"./shared-3a7cf739.js";import{d as s}from"./shared-ca0f14c1.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
@@ -1,4 +1,4 @@
1
- import{D as t,i as e,e as n}from"./shared-c13674cb.js";import{D as o}from"./shared-33b47806.js";class l extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",l);const s=document.createElement("template");s.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(s.content);const a=document.createElement("template");a.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(a.content);const r=document.createElement("template");r.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(r.content);const i=document.createElement("template");i.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(i.content);const c=document.createElement("template");c.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(c.content);
1
+ import{D as t,i as e,e as n}from"./shared-91b86bae.js";import{D as o}from"./shared-f31044b8.js";class l extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",l);const s=document.createElement("template");s.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(s.content);const a=document.createElement("template");a.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(a.content);const r=document.createElement("template");r.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(r.content);const i=document.createElement("template");i.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(i.content);const c=document.createElement("template");c.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(c.content);
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 Vaadin Ltd.
@@ -1,4 +1,4 @@
1
- import{I as e,_ as t}from"./shared-fadcb2e1.js";import{F as s}from"./shared-fd001fd3.js";import{E as a,T as i}from"./shared-8936b109.js";import"./shared-dbdc2a38.js";import"./shared-12f8034b.js";import"./shared-32b15545.js";import"./shared-a64ead08.js";import"./shared-2b077e01.js";import{d as r,P as n,A as o,L as l,c as d,h}from"./shared-dc73b9a5.js";import{h as u,P as c}from"./shared-c13674cb.js";import"./shared-c5a638d1.js";import{p as m}from"./shared-da130124.js";import{a as p,y as v}from"./shared-33b47806.js";import{T as g,U as b,V as _,W as y,X as f,Y as x,Z as w,$ as E,b as T,a0 as $,a1 as A,a2 as S,a3 as k,a4 as V,a5 as C,a6 as I,m as M,a7 as j}from"./shared-b772fbb1.js";import{s as z}from"./shared-99940888.js";import{i as q}from"./shared-e6a7b2f1.js";var L={raise:g,send:b,sendParent:_,sendUpdate:y,log:f,cancel:x,start:w,stop:E,assign:T,after:$,done:A,respond:S,forwardTo:k,escalate:V,choose:C,pure:I};const F=r((e=>t=>{const{element:s,name:a,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof n)s[a]!==e&&t.setValue(e);else{if(!(t instanceof o))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class O extends CustomEvent{constructor(e){super("change",{detail:e})}}const P=u`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
1
+ import{I as e,_ as t}from"./shared-ca0f14c1.js";import{F as s}from"./shared-3e3c07ac.js";import{E as a,T as i}from"./shared-084b6372.js";import"./shared-4560425c.js";import"./shared-901ca702.js";import"./shared-c7280a24.js";import"./shared-fe68657a.js";import"./shared-23fd456c.js";import{d as r,P as n,A as o,L as l,c as d,h}from"./shared-dc73b9a5.js";import{h as u,P as c}from"./shared-91b86bae.js";import"./shared-c63ba384.js";import{p as m}from"./shared-2f0efb2c.js";import{a as p,y as v}from"./shared-f31044b8.js";import{T as g,U as b,V as _,W as y,X as f,Y as x,Z as w,$ as E,b as T,a0 as $,a1 as A,a2 as S,a3 as k,a4 as V,a5 as C,a6 as I,m as M,a7 as j}from"./shared-3a7cf739.js";import{s as z}from"./shared-99940888.js";import{i as q}from"./shared-4c0520f6.js";var L={raise:g,send:b,sendParent:_,sendUpdate:y,log:f,cancel:x,start:w,stop:E,assign:T,after:$,done:A,respond:S,forwardTo:k,escalate:V,choose:C,pure:I};const F=r((e=>t=>{const{element:s,name:a,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof n)s[a]!==e&&t.setValue(e);else{if(!(t instanceof o))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class O extends CustomEvent{constructor(e){super("change",{detail:e})}}const P=u`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
2
2
  <template>
3
3
  <style include="lumo-required-field">
4
4
  :host {
@@ -1 +1 @@
1
- import{_ as e}from"./shared-fadcb2e1.js";import{L as s,h as t}from"./shared-dc73b9a5.js";import{w as r}from"./shared-33b47806.js";let o,a=e=>e;class d extends s{constructor(){super(...arguments),this.frame=!1}static get properties(){return e(e({},super.properties),{},{frame:{type:Boolean}})}static get styles(){return r.styles}render(){return t(o||(o=a` <section class="space-y-s font-lumo antialiased"> <h3 class="${0}"> <slot name="header"></slot> </h3> <div class="rounded-t-l rounded-b-l ${0}"> <slot></slot> </div> </section> `),"text-s font-medium text-secondary leading-none "+(this.frame?"":"pl-m"),this.frame?"border border-contrast-10 overflow-hidden":"")}}export{d as G};
1
+ import{_ as e}from"./shared-ca0f14c1.js";import{L as s,h as t}from"./shared-dc73b9a5.js";import{w as r}from"./shared-f31044b8.js";let o,a=e=>e;class d extends s{constructor(){super(...arguments),this.frame=!1}static get properties(){return e(e({},super.properties),{},{frame:{type:Boolean}})}static get styles(){return r.styles}render(){return t(o||(o=a` <section class="space-y-s font-lumo antialiased"> <h3 class="${0}"> <slot name="header"></slot> </h3> <div class="rounded-t-l rounded-b-l ${0}"> <slot></slot> </div> </section> `),"text-s font-medium text-secondary leading-none "+(this.frame?"":"pl-m"),this.frame?"border border-contrast-10 overflow-hidden":"")}}export{d as G};
@@ -1,4 +1,4 @@
1
- import{E as e,C as t,T as i}from"./shared-8936b109.js";import{h as a,P as r}from"./shared-c13674cb.js";import{a as l}from"./shared-32b15545.js";const o=a`<dom-module id="lumo-text-area" theme-for="vaadin-text-area">
1
+ import{E as e,C as t,T as a}from"./shared-084b6372.js";import{h as i,P as r}from"./shared-91b86bae.js";import{a as l}from"./shared-c7280a24.js";const o=i`<dom-module id="lumo-text-area" theme-for="vaadin-text-area">
2
2
  <template>
3
3
  <style include="lumo-text-field">
4
4
  [part="input-field"],
@@ -62,7 +62,7 @@ import{E as e,C as t,T as i}from"./shared-8936b109.js";import{h as a,P as r}from
62
62
  Copyright (c) 2017 Vaadin Ltd.
63
63
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
64
64
  */
65
- class n extends(e(l(t(i(r))))){static get template(){return a`
65
+ class n extends(e(l(t(a(r))))){static get template(){return i`
66
66
  <style include="vaadin-text-field-shared-styles">
67
67
  .vaadin-text-area-container {
68
68
  flex: auto;
@@ -131,4 +131,4 @@ class n extends(e(l(t(i(r))))){static get template(){return a`
131
131
  <div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
132
132
 
133
133
  </div>
134
- `}static get is(){return"vaadin-text-area"}static get version(){return"2.9.2"}static get properties(){return{pattern:{type:String}}}static get observers(){return["_textAreaValueChanged(value)"]}ready(){super.ready(),this._updateHeight(),this.addEventListener("animationend",this._onAnimationEnd),this._inputField=this.root.querySelector("[part=input-field]"),this._inputField.addEventListener("wheel",(e=>{const t=this._inputField.scrollTop;this._inputField.scrollTop+=e.deltaY,t!==this._inputField.scrollTop&&(e.preventDefault(),this.__scrollPositionUpdated())})),this.__scrollPositionUpdated()}__scrollPositionUpdated(){this.updateStyles({"--_text-area-vertical-scroll-position":this._inputField.scrollTop+"px"})}_onAnimationEnd(e){0===e.animationName.indexOf("vaadin-text-area-appear")&&this._updateHeight()}get _slottedTagName(){return"textarea"}_textAreaValueChanged(e){this._updateHeight()}_updateHeight(){const e=this.root.querySelector("[part=input-field]"),t=e.scrollTop,i=this.inputElement,a=this.value?this.value.length:0;if(this._oldValueLength>=a){const t=getComputedStyle(e).height,a=getComputedStyle(i).width;e.style.display="block",e.style.height=t,i.style.maxWidth=a,i.style.height="auto"}this._oldValueLength=a;const r=i.scrollHeight;r>i.clientHeight&&(i.style.height=r+"px"),i.style.removeProperty("max-width"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=t,this._dispatchIronResizeEventIfNeeded("InputHeight",r)}checkValidity(){if(!super.checkValidity())return!1;if(!this.pattern||!this.inputElement.value)return!0;try{const e=this.inputElement.value.match(this.pattern);return!!e&&e[0]===e.input}catch(e){return!0}}}customElements.define(n.is,n);
134
+ `}static get is(){return"vaadin-text-area"}static get version(){return"2.9.2"}static get properties(){return{pattern:{type:String}}}static get observers(){return["_textAreaValueChanged(value)"]}ready(){super.ready(),this._updateHeight(),this.addEventListener("animationend",this._onAnimationEnd),this._inputField=this.root.querySelector("[part=input-field]"),this._inputField.addEventListener("wheel",(e=>{const t=this._inputField.scrollTop;this._inputField.scrollTop+=e.deltaY,t!==this._inputField.scrollTop&&(e.preventDefault(),this.__scrollPositionUpdated())})),this.__scrollPositionUpdated()}__scrollPositionUpdated(){this.updateStyles({"--_text-area-vertical-scroll-position":this._inputField.scrollTop+"px"})}_onAnimationEnd(e){0===e.animationName.indexOf("vaadin-text-area-appear")&&this._updateHeight()}get _slottedTagName(){return"textarea"}_textAreaValueChanged(e){this._updateHeight()}_updateHeight(){const e=this.root.querySelector("[part=input-field]"),t=e.scrollTop,a=this.inputElement,i=this.value?this.value.length:0;if(this._oldValueLength>=i){const t=getComputedStyle(e).height,i=getComputedStyle(a).width;e.style.display="block",e.style.height=t,a.style.maxWidth=i,a.style.height="auto"}this._oldValueLength=i;const r=a.scrollHeight;r>a.clientHeight&&(a.style.height=r+"px"),a.style.removeProperty("max-width"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=t,this._dispatchIronResizeEventIfNeeded("InputHeight",r)}checkValidity(){if(!super.checkValidity())return!1;if(!this.pattern||!this.inputElement.value)return!0;try{const e=this.inputElement.value.match(this.pattern);return!!e&&e[0]===e.input}catch(e){return!0}}}customElements.define(n.is,n);
@@ -1 +1 @@
1
- import{_ as t}from"./shared-fadcb2e1.js";import{C as e}from"./shared-30bb4828.js";import{h as i}from"./shared-dc73b9a5.js";import{N as s}from"./shared-89dce718.js";import{T as r}from"./shared-33b47806.js";import{c as a}from"./shared-4e709717.js";let d,l,n,o=t=>t;const h=e(r(s));class p extends h{constructor(){super(...arguments),this.templates={},this.lang="",this.ns="",this.__renderTitle=t=>i(d||(d=o` <div data-testid="title"> ${0} <div class="text-secondary truncate"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=t=>i(l||(l=o` <div data-testid="subtitle"> ${0} <div class="font-semibold truncate"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}static get properties(){return t(t({},super.properties),{},{lang:{type:String},ns:{type:String}})}render(t){var e,s;const r=this.hiddenSelector;return i(n||(n=o` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-m"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" class="m-auto" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),!this.data&&this.in("busy"),r.matches("title",!0)?"":this.__renderTitle(null==t?void 0:t.title),r.matches("subtitle",!0)?"":this.__renderSubtitle(null==t?void 0:t.subtitle),a({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}}export{p as T};
1
+ import{_ as t}from"./shared-ca0f14c1.js";import{C as e}from"./shared-85d45495.js";import{h as i}from"./shared-dc73b9a5.js";import{N as s}from"./shared-619adfad.js";import{T as r}from"./shared-f31044b8.js";import{c as a}from"./shared-4e709717.js";let d,l,n,o=t=>t;const h=e(r(s));class p extends h{constructor(){super(...arguments),this.templates={},this.lang="",this.ns="",this.__renderTitle=t=>i(d||(d=o` <div data-testid="title"> ${0} <div class="text-secondary truncate"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=t=>i(l||(l=o` <div data-testid="subtitle"> ${0} <div class="font-semibold truncate"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}static get properties(){return t(t({},super.properties),{},{lang:{type:String},ns:{type:String}})}render(t){var e,s;const r=this.hiddenSelector;return i(n||(n=o` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-m"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" class="m-auto" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),!this.data&&this.in("busy"),r.matches("title",!0)?"":this.__renderTitle(null==t?void 0:t.title),r.matches("subtitle",!0)?"":this.__renderSubtitle(null==t?void 0:t.subtitle),a({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}}export{p as T};
@@ -1 +1 @@
1
- import{I as e,_ as t}from"./shared-fadcb2e1.js";import{h as n,L as r}from"./shared-dc73b9a5.js";import{i as s,a}from"./shared-33b47806.js";import{F as i,A as o}from"./shared-b772fbb1.js";const c={type:"backend",init:()=>{},read:(e,t,n)=>{const r=async e=>{const t=e.ok?null:new Error(await e.text()),r=!!e.ok&&await e.json();n(t,r)},s=e=>{const t=e instanceof Error?e:new Error(String(e));n(t,!1)},a=new i("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new o.WHATWGRequest(`foxy://i18n/${t}/${e}`),resolve:r,reject:s});dispatchEvent(a),a.defaultPrevented||fetch(a.request).then(r).catch(s)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function l(e,t=!1){var n;const r=e.replace(/(y|m|w|d)/,""),s=e.replace(/\.?\d+/,"");return{count:".5"===r?.5:parseInt(r),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[s])&&void 0!==n?n:s}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const a=t.endsWith("_percentage")?.01:1,i=n.split("|"),o=`${["allunits","incremental","repeat","single"].includes(i[0])?i.shift():"single"}_${t}_discount_summary`;return i.map((t=>{var n,r;const s=null!==(r=null===(n=/[-+]/.exec(t))||void 0===n?void 0:n.index)&&void 0!==r?r:-1,i=parseFloat(t.substring(s))*a,c=parseFloat(t.substring(0,s));return`$t(${o}, ${JSON.stringify({adjustment:i,from:c,ns:e})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:a}=l(e,!0);return.5===s&&"month"===a&&(s=2,a="week"),r.format(s,a)},percent:(e,t,n)=>{let r=null;try{"number"==typeof e&&(r=e.toLocaleString(n,{style:"percent"}))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return r||String(e)},ordinal:(e,t,n)=>`${e}$t(ordinal_${new Intl.PluralRules(n,{type:"ordinal"}).select(e)})`,price:(e,t,n,r)=>{var s;try{const[t,a]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",style:"currency",currency:a})}catch(t){return e}},date:(e,t,n)=>{if(!e)return"$t(unknown)";const r=new Date(e),s=(new Date).getFullYear()===r.getFullYear()?void 0:"numeric";return r.toLocaleDateString(n,{month:"long",year:s,day:"numeric"})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(a(e(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof i&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=i,m.i18next=s.createInstance().use(c),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,a;return null!==(a=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==a?a:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,l as p};
1
+ import{I as e,_ as t}from"./shared-ca0f14c1.js";import{h as n,L as r}from"./shared-dc73b9a5.js";import{i as s,a}from"./shared-f31044b8.js";import{F as i,A as o}from"./shared-3a7cf739.js";const c={type:"backend",init:()=>{},read:(e,t,n)=>{const r=async e=>{const t=e.ok?null:new Error(await e.text()),r=!!e.ok&&await e.json();n(t,r)},s=e=>{const t=e instanceof Error?e:new Error(String(e));n(t,!1)},a=new i("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new o.WHATWGRequest(`foxy://i18n/${t}/${e}`),resolve:r,reject:s});dispatchEvent(a),a.defaultPrevented||fetch(a.request).then(r).catch(s)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function l(e,t=!1){var n;const r=e.replace(/(y|m|w|d)/,""),s=e.replace(/\.?\d+/,"");return{count:".5"===r?.5:parseInt(r),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[s])&&void 0!==n?n:s}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const a=t.endsWith("_percentage")?.01:1,i=n.split("|"),o=`${["allunits","incremental","repeat","single"].includes(i[0])?i.shift():"single"}_${t}_discount_summary`;return i.map((t=>{var n,r;const s=null!==(r=null===(n=/[-+]/.exec(t))||void 0===n?void 0:n.index)&&void 0!==r?r:-1,i=parseFloat(t.substring(s))*a,c=parseFloat(t.substring(0,s));return`$t(${o}, ${JSON.stringify({adjustment:i,from:c,ns:e})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:a}=l(e,!0);return.5===s&&"month"===a&&(s=2,a="week"),r.format(s,a)},percent:(e,t,n)=>{let r=null;try{"number"==typeof e&&(r=e.toLocaleString(n,{style:"percent"}))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return r||String(e)},ordinal:(e,t,n)=>`${e}$t(ordinal_${new Intl.PluralRules(n,{type:"ordinal"}).select(e)})`,price:(e,t,n,r)=>{var s;try{const[t,a]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",style:"currency",currency:a})}catch(t){return e}},date:(e,t,n)=>{if(!e)return"$t(unknown)";const r=new Date(e),s=(new Date).getFullYear()===r.getFullYear()?void 0:"numeric";return r.toLocaleDateString(n,{month:"long",year:s,day:"numeric"})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(a(e(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof i&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=i,m.i18next=s.createInstance().use(c),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,a;return null!==(a=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==a?a:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,l as p};
@@ -1 +1 @@
1
- import{_ as t,I as e}from"./shared-fadcb2e1.js";import{h as s,L as i}from"./shared-dc73b9a5.js";import{C as r}from"./shared-30bb4828.js";import{a as n,T as o}from"./shared-33b47806.js";import{c as a}from"./shared-4e709717.js";import{l}from"./shared-22ba9566.js";import{r as c}from"./shared-a0c6a159.js";let d,h,u,m=t=>t;const p=n(r(o(e(i))));class b extends p{constructor(){super(...arguments),this.options=[],this.items=[],this.__newItem=""}static get properties(){return t(t({},super.properties),{},{options:{type:Array},items:{type:Array},__newItem:{attribute:!1}})}render(){const t=a({"w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0":!0,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!0,"text-tertiary hover-bg-error-10 hover-text-error":!this.disabled,"cursor-default text-disabled":this.disabled,"flex items-center justify-center":!this.readonly,hidden:this.readonly}),e=a({"transition-colors h-l ml-m flex items-center":!0,"text-secondary":this.readonly,"text-disabled":this.disabled}),i=this.disabled||!this.__newItem,r=()=>{this.__newItem&&(this.items.push({value:this.__newItem}),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change")),this.__newItem="")};return s(d||(d=m` <slot></slot> <ol class="divide-y divide-contrast-10"> ${0} </ol> <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @change="${0}" @input="${0}"> <datalist id="list"> ${0} </datalist> <div class="transition-opacity ${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon> </button> </div> </div> `),c(this.items,(t=>t.value),((i,r)=>{var n;return s(h||(h=m` <li class="${0}"> <div class="flex-1 mr-s">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon> </button> </li> `),e,null!==(n=i.label)&&void 0!==n?n:i.value,this.t("delete"),t,this.disabled,(()=>{this.items.splice(r,1),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change"))}))})),a({"ml-m h-l flex items-center":!0,"border-t border-contrast-10":this.items.length>0,flex:!this.readonly,hidden:this.readonly}),this.t("type_here"),l(this.__newItem),this.disabled,this.readonly,(t=>"Enter"===t.key&&r()),(t=>t.stopPropagation()),(t=>{this.__newItem=t.currentTarget.value.trim()}),this.options.map((({label:t,value:e})=>{if(!this.items.some((t=>t.value===e)))return s(u||(u=m`<option value="${0}">${0}</option>`),e,null!=t?t:e)})),this.__newItem?"opacity-100":"opacity-0",this.t("submit"),a({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":i,"bg-success-10 text-success cursor-pointer":!i,"hover-bg-success hover-text-success-contrast":!i,"focus-ring-2":!i}),i,r)}}export{b as E};
1
+ import{_ as t,I as e}from"./shared-ca0f14c1.js";import{h as s,L as i}from"./shared-dc73b9a5.js";import{C as r}from"./shared-85d45495.js";import{a as n,T as o}from"./shared-f31044b8.js";import{c as a}from"./shared-4e709717.js";import{l}from"./shared-22ba9566.js";import{r as c}from"./shared-a0c6a159.js";let d,h,u,m=t=>t;const p=n(r(o(e(i))));class b extends p{constructor(){super(...arguments),this.options=[],this.items=[],this.__newItem=""}static get properties(){return t(t({},super.properties),{},{options:{type:Array},items:{type:Array},__newItem:{attribute:!1}})}render(){const t=a({"w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0":!0,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!0,"text-tertiary hover-bg-error-10 hover-text-error":!this.disabled,"cursor-default text-disabled":this.disabled,"flex items-center justify-center":!this.readonly,hidden:this.readonly}),e=a({"transition-colors h-l ml-m flex items-center":!0,"text-secondary":this.readonly,"text-disabled":this.disabled}),i=this.disabled||!this.__newItem,r=()=>{this.__newItem&&(this.items.push({value:this.__newItem}),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change")),this.__newItem="")};return s(d||(d=m` <slot></slot> <ol class="divide-y divide-contrast-10"> ${0} </ol> <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @change="${0}" @input="${0}"> <datalist id="list"> ${0} </datalist> <div class="transition-opacity ${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon> </button> </div> </div> `),c(this.items,(t=>t.value),((i,r)=>{var n;return s(h||(h=m` <li class="${0}"> <div class="flex-1 mr-s">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon> </button> </li> `),e,null!==(n=i.label)&&void 0!==n?n:i.value,this.t("delete"),t,this.disabled,(()=>{this.items.splice(r,1),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change"))}))})),a({"ml-m h-l flex items-center":!0,"border-t border-contrast-10":this.items.length>0,flex:!this.readonly,hidden:this.readonly}),this.t("type_here"),l(this.__newItem),this.disabled,this.readonly,(t=>"Enter"===t.key&&r()),(t=>t.stopPropagation()),(t=>{this.__newItem=t.currentTarget.value.trim()}),this.options.map((({label:t,value:e})=>{if(!this.items.some((t=>t.value===e)))return s(u||(u=m`<option value="${0}">${0}</option>`),e,null!=t?t:e)})),this.__newItem?"opacity-100":"opacity-0",this.t("submit"),a({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":i,"bg-success-10 text-success cursor-pointer":!i,"hover-bg-success hover-text-success-contrast":!i,"focus-ring-2":!i}),i,r)}}export{b as E};
@@ -1 +1 @@
1
- import"./shared-c5a638d1.js";import{I as e}from"./shared-2f186d21.js";import{_ as t}from"./shared-fadcb2e1.js";import{i as a}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import{A as i}from"./shared-16d10bca.js";let r,l=e=>e;customElements.define("foxy-internal-async-combo-box-control",class extends e{constructor(){super(...arguments),this.itemLabelPath=null,this.itemValuePath=null,this.selectedItem=void 0,this.first=null}static get properties(){return t(t({},super.properties),{},{itemLabelPath:{type:String,attribute:"item-label-path"},itemValuePath:{type:String,attribute:"item-value-path"},selectedItem:{attribute:!1},first:{type:String}})}renderControl(){var e,t,o=this;return s(r||(r=l` <vaadin-combo-box item-value-path="${0}" item-label-path="${0}" error-message="${0}" item-id-path="_links.self.href" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .dataProvider="${0}" .selectedItem="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),a(null!==(e=this.itemValuePath)&&void 0!==e?e:void 0),a(null!==(t=this.itemLabelPath)&&void 0!==t?t:void 0),a(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,(async function(e,t){if(!o.first)return t([],0);const a=new URL(o.first);a.searchParams.set("offset",String(e.page*e.pageSize)),a.searchParams.set("limit",String(e.pageSize)),e.filter&&o.itemLabelPath&&a.searchParams.set(o.itemLabelPath,`*${e.filter}*`);const s=await new i(o).fetch(a.toString());if(!s.ok)throw new Error(await s.text());const r=await s.json();t(Array.from(Object.values(r._embedded))[0],r.total_items)}),this.selectedItem,this._value,(e=>{const t=e.currentTarget;this._value=t.value,this._value===t.value?(this.selectedItem=t.selectedItem,this.dispatchEvent(new CustomEvent("selected-item-changed"))):t.value=this._value}))}updated(e){if(super.updated(e),e.has("first")){const e=this.renderRoot.querySelector("vaadin-combo-box");e.size=0,e.size=1}}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
1
+ import"./shared-c63ba384.js";import{I as e}from"./shared-4773b634.js";import{_ as t}from"./shared-ca0f14c1.js";import{i as a}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import{A as i}from"./shared-9b392ba8.js";let r,l=e=>e;customElements.define("foxy-internal-async-combo-box-control",class extends e{constructor(){super(...arguments),this.itemLabelPath=null,this.itemValuePath=null,this.selectedItem=void 0,this.first=null}static get properties(){return t(t({},super.properties),{},{itemLabelPath:{type:String,attribute:"item-label-path"},itemValuePath:{type:String,attribute:"item-value-path"},selectedItem:{attribute:!1},first:{type:String}})}renderControl(){var e,t,o=this;return s(r||(r=l` <vaadin-combo-box item-value-path="${0}" item-label-path="${0}" error-message="${0}" item-id-path="_links.self.href" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .dataProvider="${0}" .selectedItem="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),a(null!==(e=this.itemValuePath)&&void 0!==e?e:void 0),a(null!==(t=this.itemLabelPath)&&void 0!==t?t:void 0),a(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,(async function(e,t){if(!o.first)return t([],0);const a=new URL(o.first);a.searchParams.set("offset",String(e.page*e.pageSize)),a.searchParams.set("limit",String(e.pageSize)),e.filter&&o.itemLabelPath&&a.searchParams.set(o.itemLabelPath,`*${e.filter}*`);const s=await new i(o).fetch(a.toString());if(!s.ok)throw new Error(await s.text());const r=await s.json();t(Array.from(Object.values(r._embedded))[0],r.total_items)}),this.selectedItem,this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,this._value===t.value?(this.selectedItem=t.selectedItem,this.dispatchEvent(new CustomEvent("selected-item-changed"))):t.value=this._value}))}updated(e){if(super.updated(e),e.has("first")){const e=this.renderRoot.querySelector("vaadin-combo-box");e&&(e.size=0,e.size=1)}}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{S as t,i as e,e as n,f as r,r as i,h as o,j as a,c as s,a as c,g as u,d as l}from"./shared-fadcb2e1.js";class f extends Event{constructor(t,e){super(t,e),this.request=e.request,this.__reject=e.reject,this.__resolve=e.resolve}respondWith(t){this.preventDefault(),this.stopImmediatePropagation(),t.then(this.__resolve).catch(this.__reject)}}
1
+ import{S as t,i as e,e as n,f as r,r as i,h as o,j as a,c as s,a as c,g as u,d as l}from"./shared-ca0f14c1.js";class f extends Event{constructor(t,e){super(t,e),this.request=e.request,this.__reject=e.reject,this.__resolve=e.resolve}respondWith(t){this.preventDefault(),this.stopImmediatePropagation(),t.then(this.__resolve).catch(this.__reject)}}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -1,4 +1,4 @@
1
- import{f as e,M as t,c as s,n as i,d as n,g as r,V as o,j as l,k as a,l as h,u as c,m as d,o as u,w as _,p,E as f,G as m,q as y,r as g,s as b,D as C,t as v,v as x,x as w,P as S,y as P,z as E,e as I,A as O,h as A}from"./shared-c13674cb.js";import{l as k,b as N,s as T,c as M,u as D,d as R,f as F}from"./shared-33b47806.js";
1
+ import{f as e,M as t,c as s,n as i,d as n,g as r,V as o,j as l,k as a,l as h,u as c,m as d,o as u,w as _,p,E as f,G as m,q as y,r as g,s as b,D as C,t as v,v as x,x as w,P as S,y as P,z as E,e as I,A as O,h as A}from"./shared-91b86bae.js";import{l as k,b as N,s as T,c as M,u as D,d as R,f as F}from"./shared-f31044b8.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1,4 +1,4 @@
1
- import"./shared-fd001fd3.js";import{h}from"./shared-c13674cb.js";
1
+ import"./shared-3e3c07ac.js";import{h}from"./shared-91b86bae.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2014 The Polymer Project Authors. All rights reserved.