@foxy.io/elements 1.50.0 → 1.51.0

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 (213) 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-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-admin-transaction-card.js +1 -1
  7. package/dist/cdn/foxy-api-browser.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  9. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  10. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-card.js +1 -1
  12. package/dist/cdn/foxy-attribute-form.js +1 -1
  13. package/dist/cdn/foxy-billing-address-card.js +1 -1
  14. package/dist/cdn/foxy-cancellation-form.js +1 -1
  15. package/dist/cdn/foxy-cart-card.js +1 -1
  16. package/dist/cdn/foxy-cart-form.js +2 -2
  17. package/dist/cdn/foxy-client-card.js +1 -1
  18. package/dist/cdn/foxy-client-form.js +1 -1
  19. package/dist/cdn/foxy-collection-page.js +1 -1
  20. package/dist/cdn/foxy-collection-pages.js +1 -1
  21. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  22. package/dist/cdn/foxy-coupon-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  24. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  26. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  27. package/dist/cdn/foxy-coupon-form.js +1 -1
  28. package/dist/cdn/foxy-custom-field-card.js +1 -1
  29. package/dist/cdn/foxy-custom-field-form.js +1 -1
  30. package/dist/cdn/foxy-customer-card.js +1 -1
  31. package/dist/cdn/foxy-customer-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  34. package/dist/cdn/foxy-customer-portal.js +1 -1
  35. package/dist/cdn/foxy-customer.js +1 -1
  36. package/dist/cdn/foxy-customers-table.js +1 -1
  37. package/dist/cdn/foxy-discount-builder.js +1 -1
  38. package/dist/cdn/foxy-discount-card.js +1 -1
  39. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  40. package/dist/cdn/foxy-donation.js +1 -1
  41. package/dist/cdn/foxy-downloadable-card.js +1 -1
  42. package/dist/cdn/foxy-downloadable-form.js +1 -1
  43. package/dist/cdn/foxy-email-template-card.js +1 -1
  44. package/dist/cdn/foxy-email-template-form.js +1 -1
  45. package/dist/cdn/foxy-error-entry-card.js +1 -1
  46. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  49. package/dist/cdn/foxy-form-dialog.js +1 -1
  50. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  51. package/dist/cdn/foxy-gift-card-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  55. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  56. package/dist/cdn/foxy-gift-card-form.js +1 -1
  57. package/dist/cdn/foxy-i18n-editor.js +1 -1
  58. package/dist/cdn/foxy-i18n.js +1 -1
  59. package/dist/cdn/foxy-integration-card.js +1 -1
  60. package/dist/cdn/foxy-integration-form.js +1 -1
  61. package/dist/cdn/foxy-item-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-form.js +1 -1
  64. package/dist/cdn/foxy-item-form.js +1 -1
  65. package/dist/cdn/foxy-item-option-card.js +1 -1
  66. package/dist/cdn/foxy-item-option-form.js +1 -1
  67. package/dist/cdn/foxy-items-form.js +1 -1
  68. package/dist/cdn/foxy-native-integration-card.js +1 -1
  69. package/dist/cdn/foxy-native-integration-form.js +1 -1
  70. package/dist/cdn/foxy-pagination.js +1 -1
  71. package/dist/cdn/foxy-passkey-card.js +1 -1
  72. package/dist/cdn/foxy-passkey-form.js +1 -1
  73. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  74. package/dist/cdn/foxy-payment-card.js +1 -1
  75. package/dist/cdn/foxy-payment-method-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  82. package/dist/cdn/foxy-query-builder.js +1 -1
  83. package/dist/cdn/foxy-report-form.js +1 -195
  84. package/dist/cdn/foxy-reports-table.js +1 -1
  85. package/dist/cdn/foxy-shipment-card.js +1 -1
  86. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  87. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  90. package/dist/cdn/foxy-sign-in-form.js +1 -1
  91. package/dist/cdn/foxy-spinner.js +1 -1
  92. package/dist/cdn/foxy-store-card.js +1 -1
  93. package/dist/cdn/foxy-store-form.js +1 -1
  94. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  95. package/dist/cdn/foxy-store-transaction-folder-card.js +1 -1
  96. package/dist/cdn/foxy-store-transaction-folder-form.js +1 -1
  97. package/dist/cdn/foxy-subscription-card.js +1 -1
  98. package/dist/cdn/foxy-subscription-form.js +1 -1
  99. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  100. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  101. package/dist/cdn/foxy-table.js +1 -1
  102. package/dist/cdn/foxy-tax-card.js +1 -1
  103. package/dist/cdn/foxy-tax-form.js +1 -1
  104. package/dist/cdn/foxy-template-config-form.js +1 -1
  105. package/dist/cdn/foxy-template-form.js +1 -1
  106. package/dist/cdn/foxy-template-set-card.js +1 -1
  107. package/dist/cdn/foxy-template-set-form.js +1 -1
  108. package/dist/cdn/foxy-transaction-card.js +1 -1
  109. package/dist/cdn/foxy-transaction.js +1 -1
  110. package/dist/cdn/foxy-transactions-table.js +1 -1
  111. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  112. package/dist/cdn/foxy-user-card.js +1 -1
  113. package/dist/cdn/foxy-user-form.js +1 -1
  114. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  115. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  116. package/dist/cdn/foxy-users-table.js +1 -1
  117. package/dist/cdn/foxy-webhook-card.js +1 -1
  118. package/dist/cdn/foxy-webhook-form.js +1 -1
  119. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  120. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  121. package/dist/cdn/{shared-910d49eb.js → shared-02fb8ce3.js} +1 -1
  122. package/dist/cdn/{shared-b0453b08.js → shared-03519cae.js} +1 -1
  123. package/dist/cdn/{shared-a9a8eb7c.js → shared-040485bb.js} +1 -1
  124. package/dist/cdn/{shared-de4ec7bb.js → shared-0682a41b.js} +1 -1
  125. package/dist/cdn/{shared-d74aac59.js → shared-09acffe6.js} +1 -1
  126. package/dist/cdn/{shared-f7965314.js → shared-211bd1dd.js} +1 -1
  127. package/dist/cdn/{shared-8dd6e5cc.js → shared-2463790e.js} +1 -1
  128. package/dist/cdn/{shared-4cc1fb20.js → shared-2a5c640b.js} +1 -1
  129. package/dist/cdn/{shared-1fa1abbd.js → shared-300bf21a.js} +1 -1
  130. package/dist/cdn/{shared-bb2b7d41.js → shared-35f59eae.js} +1 -1
  131. package/dist/cdn/{shared-e9d87207.js → shared-36010fae.js} +1 -1
  132. package/dist/cdn/{shared-490dadf8.js → shared-375d2c8b.js} +1 -1
  133. package/dist/cdn/{shared-7c5881c1.js → shared-3be57b19.js} +1 -1
  134. package/dist/cdn/{shared-462566b0.js → shared-3e37477f.js} +1 -1
  135. package/dist/cdn/{shared-31e75a4a.js → shared-40475d9c.js} +1 -1
  136. package/dist/cdn/{shared-2a84ee72.js → shared-45fd1dc1.js} +1 -1
  137. package/dist/cdn/{shared-aa258319.js → shared-462820a3.js} +1 -1
  138. package/dist/cdn/{shared-0ea24ca2.js → shared-4818631e.js} +1 -1
  139. package/dist/cdn/{shared-67aeac0f.js → shared-49c77c18.js} +1 -1
  140. package/dist/cdn/{shared-1da8110b.js → shared-4f162d81.js} +1 -1
  141. package/dist/cdn/{shared-097487d0.js → shared-52d5b281.js} +1 -1
  142. package/dist/cdn/{shared-328aa161.js → shared-54380337.js} +1 -1
  143. package/dist/cdn/{shared-ad470adf.js → shared-58fdefe5.js} +2 -2
  144. package/dist/cdn/{shared-f05c924a.js → shared-5ac5253b.js} +1 -1
  145. package/dist/cdn/{shared-021fbb51.js → shared-5b1ad45f.js} +2 -2
  146. package/dist/cdn/{shared-68c69a0f.js → shared-5ded9f39.js} +4 -4
  147. package/dist/cdn/shared-5e07ca45.js +1 -0
  148. package/dist/cdn/{shared-9a454e09.js → shared-650b8749.js} +1 -1
  149. package/dist/cdn/{shared-47ce4456.js → shared-6545a38f.js} +4 -4
  150. package/dist/cdn/{shared-fc6e64a4.js → shared-70e64227.js} +2 -2
  151. package/dist/cdn/{shared-add0286c.js → shared-75c1ce85.js} +1 -1
  152. package/dist/cdn/{shared-334b7e24.js → shared-7c099d54.js} +1 -1
  153. package/dist/cdn/{shared-084e1772.js → shared-822537f7.js} +1 -1
  154. package/dist/cdn/{shared-0a7a4660.js → shared-86f4e737.js} +1 -1
  155. package/dist/cdn/{shared-986bcd05.js → shared-891e2675.js} +1 -1
  156. package/dist/cdn/{shared-8f61408a.js → shared-8dd5edce.js} +1 -1
  157. package/dist/cdn/{shared-3c0e3876.js → shared-91fbd884.js} +4 -4
  158. package/dist/cdn/{shared-8bf38c47.js → shared-9c308061.js} +1 -1
  159. package/dist/cdn/{shared-9a291941.js → shared-9cf7a458.js} +1 -1
  160. package/dist/cdn/{shared-a18827a4.js → shared-9d0432c3.js} +1 -1
  161. package/dist/cdn/{shared-83613f15.js → shared-9dc6233c.js} +1 -1
  162. package/dist/cdn/{shared-ba43928a.js → shared-9ee4873a.js} +1 -1
  163. package/dist/cdn/{shared-be071e3d.js → shared-a1d07d0c.js} +1 -1
  164. package/dist/cdn/{shared-d01853e2.js → shared-a7ea2b28.js} +1 -1
  165. package/dist/cdn/{shared-4dc0bd88.js → shared-acfe37e7.js} +1 -1
  166. package/dist/cdn/shared-af6ccc54.js +1 -0
  167. package/dist/cdn/{shared-7e1a3361.js → shared-b142e823.js} +1 -1
  168. package/dist/cdn/{shared-18e301f2.js → shared-b7f25c69.js} +1 -1
  169. package/dist/cdn/{shared-1492fa1c.js → shared-bb5a2cdf.js} +1 -1
  170. package/dist/cdn/{shared-b0db52f7.js → shared-bc110f4a.js} +1 -1
  171. package/dist/cdn/shared-beabe645.js +1 -0
  172. package/dist/cdn/shared-bf03e2e9.js +1 -0
  173. package/dist/cdn/{shared-1301af85.js → shared-c9d67ca3.js} +1 -1
  174. package/dist/cdn/{shared-56a16e03.js → shared-ceeffa02.js} +1 -1
  175. package/dist/cdn/{shared-ddc1c32f.js → shared-d0af0d8d.js} +1 -1
  176. package/dist/cdn/{shared-f9bb0924.js → shared-d3205195.js} +1 -1
  177. package/dist/cdn/{shared-d48e260f.js → shared-d53f94a0.js} +1 -1
  178. package/dist/cdn/{shared-ee752063.js → shared-d80549b6.js} +1 -1
  179. package/dist/cdn/{shared-3c53446d.js → shared-d91ec395.js} +1 -1
  180. package/dist/cdn/{shared-591ee1bf.js → shared-dae65afe.js} +1 -1
  181. package/dist/cdn/{shared-7a5d645f.js → shared-e54c8946.js} +1 -1
  182. package/dist/cdn/shared-e650caf3.js +1 -0
  183. package/dist/cdn/{shared-bc8a1435.js → shared-e8571c37.js} +1 -1
  184. package/dist/cdn/{shared-43fb8242.js → shared-ee677138.js} +1 -1
  185. package/dist/cdn/{shared-6880e1f6.js → shared-f4738502.js} +1 -1
  186. package/dist/cdn/{shared-5fbbaea2.js → shared-fe73af3a.js} +1 -1
  187. package/dist/cdn/translations/report-form/en.json +83 -33
  188. package/dist/cdn/translations/reports-table/en.json +1 -0
  189. package/dist/elements/internal/InternalNativeDateControl/InternalNativeDateControl.d.ts +18 -0
  190. package/dist/elements/internal/InternalNativeDateControl/InternalNativeDateControl.js +109 -0
  191. package/dist/elements/internal/InternalNativeDateControl/InternalNativeDateControl.js.map +1 -0
  192. package/dist/elements/internal/InternalNativeDateControl/index.d.ts +3 -0
  193. package/dist/elements/internal/InternalNativeDateControl/index.js +5 -0
  194. package/dist/elements/internal/InternalNativeDateControl/index.js.map +1 -0
  195. package/dist/elements/public/ReportForm/ReportForm.d.ts +20 -18
  196. package/dist/elements/public/ReportForm/ReportForm.js +126 -339
  197. package/dist/elements/public/ReportForm/ReportForm.js.map +1 -1
  198. package/dist/elements/public/ReportForm/index.d.ts +5 -9
  199. package/dist/elements/public/ReportForm/index.js +5 -9
  200. package/dist/elements/public/ReportForm/index.js.map +1 -1
  201. package/dist/elements/public/ReportForm/utils.d.ts +1 -0
  202. package/dist/elements/public/ReportForm/utils.js +4 -0
  203. package/dist/elements/public/ReportForm/utils.js.map +1 -1
  204. package/dist/mixins/themeable.js +0 -8
  205. package/dist/mixins/themeable.js.map +1 -1
  206. package/dist/utils/safe-date.js +7 -1
  207. package/dist/utils/safe-date.js.map +1 -1
  208. package/package.json +1 -1
  209. package/dist/cdn/shared-04277241.js +0 -1
  210. package/dist/cdn/shared-200aa12d.js +0 -1
  211. package/dist/cdn/shared-26b55da2.js +0 -1
  212. package/dist/cdn/shared-55fa26c2.js +0 -1
  213. package/dist/cdn/shared-e6c743bd.js +0 -1
@@ -1,4 +1,4 @@
1
- import"./shared-b0db52f7.js";import"./shared-5fbbaea2.js";import{h as e,P as t,D as i,t as s,a as o,p as n,i as r,e as a,y as l,z as h}from"./shared-021fbb51.js";import"./shared-d48e260f.js";import{T as d,D as c,E as u}from"./shared-9a291941.js";import{a as _,I as m,b as p}from"./shared-3c0e3876.js";import"./shared-ba43928a.js";import"./shared-910d49eb.js";import{C as v}from"./shared-be071e3d.js";import{t as f,m as g,F as y,P as b,f as I,d as x,O as w,D as S,a as C}from"./shared-8dd6e5cc.js";
1
+ import"./shared-bc110f4a.js";import"./shared-fe73af3a.js";import{h as e,P as t,D as i,t as s,a as o,p as n,i as r,e as a,y as l,z as h}from"./shared-5b1ad45f.js";import"./shared-d53f94a0.js";import{T as d,D as c,E as u}from"./shared-9cf7a458.js";import{a as _,I as m,b as p}from"./shared-91fbd884.js";import"./shared-9ee4873a.js";import"./shared-02fb8ce3.js";import{C as v}from"./shared-a1d07d0c.js";import{t as f,m as g,F as y,P as b,f as I,d as x,O as w,D as S,a as C}from"./shared-2463790e.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -528,4 +528,4 @@ This program is available under Apache License Version 2.0, available at https:/
528
528
 
529
529
  <vaadin-combo-box-dropdown-wrapper id="overlay" opened="[[opened]]" renderer="[[renderer]]" position-target="[[_getPositionTarget()]]" _focused-index="[[_focusedIndex]]" _item-id-path="[[itemIdPath]]" _item-label-path="[[itemLabelPath]]" loading="[[loading]]" theme="[[theme]]">
530
530
  </vaadin-combo-box-dropdown-wrapper>
531
- `}constructor(){super(),this.theme}static get is(){return"vaadin-combo-box"}static get version(){return"5.5.3"}static get properties(){return{label:{type:String,reflectToAttribute:!0},required:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},preventInvalidInput:{type:Boolean},pattern:{type:String},errorMessage:{type:String},autofocus:{type:Boolean},placeholder:{type:String,value:""},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1},clearButtonVisible:{type:Boolean,value:!1}}}static get observers(){return["_updateAriaExpanded(opened)"]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i);/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&this.root&&Array.prototype.forEach.call(this.root.querySelectorAll("*"),(e=>{e.style["-webkit-backface-visibility"]="visible",e.style["-webkit-backface-visibility"]=""}))}ready(){super.ready(),this.inputElement.validate=()=>{},this.inputElement.invalid=this.invalid,this._nativeInput=this.inputElement.focusElement,this._toggleElement=this.$.toggleButton,this._clearElement=this.inputElement.shadowRoot.querySelector('[part="clear-button"]'),this.addEventListener("keydown",(e=>{this._isEventKey(e,"esc")&&this._onEscape(e)}),!0),this._nativeInput.setAttribute("role","combobox"),this._nativeInput.setAttribute("aria-autocomplete","list"),this._updateAriaExpanded()}connectedCallback(){super.connectedCallback(),this._preventInputBlur()}disconnectedCallback(){super.disconnectedCallback(),this._restoreInputBlur()}_getPositionTarget(){return this.$.input}_updateAriaExpanded(){this._nativeInput&&(this._nativeInput.setAttribute("aria-expanded",this.opened),this._toggleElement.setAttribute("aria-expanded",this.opened))}get inputElement(){return this.$.input}get focusElement(){return this.inputElement||this}}customElements.define(pe.is,pe);export{me as C,N as I,R as O,Z as a,te as b};
531
+ `}constructor(){super(),this.theme}static get is(){return"vaadin-combo-box"}static get version(){return"5.5.3"}static get properties(){return{label:{type:String,reflectToAttribute:!0},required:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},preventInvalidInput:{type:Boolean},pattern:{type:String},errorMessage:{type:String},autofocus:{type:Boolean},placeholder:{type:String,value:""},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1},clearButtonVisible:{type:Boolean,value:!1}}}static get observers(){return["_updateAriaExpanded(opened)"]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i);/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&this.root&&Array.prototype.forEach.call(this.root.querySelectorAll("*"),(e=>{e.style["-webkit-backface-visibility"]="visible",e.style["-webkit-backface-visibility"]=""}))}ready(){super.ready(),this.inputElement.validate=()=>{},this.inputElement.invalid=this.invalid,this._nativeInput=this.inputElement.focusElement,this._toggleElement=this.$.toggleButton,this._clearElement=this.inputElement.shadowRoot.querySelector('[part="clear-button"]'),this.addEventListener("keydown",(e=>{this._isEventKey(e,"esc")&&this._onEscape(e)}),!0),this._nativeInput.setAttribute("role","combobox"),this._nativeInput.setAttribute("aria-autocomplete","list"),this._updateAriaExpanded()}connectedCallback(){super.connectedCallback(),this._preventInputBlur()}disconnectedCallback(){super.disconnectedCallback(),this._restoreInputBlur()}_getPositionTarget(){return this.$.input}_updateAriaExpanded(){this._nativeInput&&(this._nativeInput.setAttribute("aria-expanded",this.opened),this._toggleElement.setAttribute("aria-expanded",this.opened))}get inputElement(){return this.$.input}get focusElement(){return this.inputElement||this}}customElements.define(pe.is,pe);export{N as I,R as O,Z as a};
@@ -1 +1 @@
1
- import"./shared-fc6e64a4.js";import{I as e}from"./shared-9a454e09.js";import{x as t}from"./shared-328aa161.js";import{c as a,h as r}from"./shared-ba5c42c7.js";import{_ as o}from"./shared-8f9014ff.js";import{s as i}from"./shared-2061be9a.js";import{p as l}from"./shared-200aa12d.js";import{i as s}from"./shared-53e42a77.js";import{s as n}from"./shared-e6c743bd.js";let m;function h(e){return new Array(7).fill(new Date).map(((t,a)=>{for(;t.getDay()!==a;)t.setDate(t.getDate()+1);return t.toLocaleDateString(e,{weekday:"short"})}))}function u(e){return new Array(7).fill(new Date).map(((t,a)=>{for(;t.getDay()!==a;)t.setDate(t.getDate()+1);return t.toLocaleDateString(e,{weekday:"long"})}))}t("vaadin-date-picker-text-field",a(m||(m=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto 1fr;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}:host([theme~=summary-item]) [part=clear-button]{transform:scale(1.5)}:host([has-value]) slot[name=suffix]{display:none}`)));let d,p=e=>e;customElements.define("foxy-internal-date-control",class extends e{constructor(){super(...arguments),this.hideClearButton=!1,this.format=null,this.layout=null,this.min=null}static get properties(){return o(o({},super.properties),{},{hideClearButton:{type:Boolean,attribute:"hide-clear-button",reflect:!0},format:{},layout:{},min:{}})}renderControl(){var e,t,a,o;let n;return n="0000-00-00"!==this._value&&this._value?"unix"===this.format?i(new Date(1e3*(null!==(e=this._value)&&void 0!==e?e:0))):"iso-long"===this.format?i(new Date(this._value)):(null!==(t=this._value)&&void 0!==t?t:"").substring(0,10):"",r(d||(d=p` <vaadin-date-picker error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" theme="${0}" min="${0}" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" .i18n="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-picker> `),s(this._errorMessage),this.placeholder,this.helperText,this.label,null!==(a=this.layout)&&void 0!==a?a:"standalone",s(null!==(o=this.min)&&void 0!==o?o:void 0),!this.hideClearButton,this.disabled,this.readonly,this._checkValidity,n,this.__pickerI18n,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{var t,a,r,o;const i=e.currentTarget;"unix"===this.format?this._value=Math.floor((null!==(a=null===(t=l(i.value))||void 0===t?void 0:t.getTime())&&void 0!==a?a:0)/1e3):"iso-long"===this.format?this._value=null!==(o=null===(r=l(i.value))||void 0===r?void 0:r.toISOString())&&void 0!==o?o:null:this._value=i.value}))}get __pickerI18n(){return{monthNames:(e=this.lang||"en",new Array(12).fill(null).map(((t,a)=>new Date(2e3,a,1).toLocaleDateString(e,{month:"long"})))),weekdays:u(this.lang||"en"),weekdaysShort:h(this.lang||"en"),firstDayOfWeek:0,week:this.t("week"),calendar:this.t("calendar"),clear:this.t("clear"),today:this.t("today"),cancel:this.t("cancel"),referenceDate:"",parseDate:null,formatTitle:(e,t)=>e+" "+t,formatDate:e=>this.t("display_value",{value:n(e.year,e.month,e.day)})};var e}});
1
+ import"./shared-70e64227.js";import{I as e}from"./shared-650b8749.js";import{x as t}from"./shared-54380337.js";import{c as a,h as r}from"./shared-ba5c42c7.js";import{_ as o}from"./shared-8f9014ff.js";import{s as i}from"./shared-2061be9a.js";import{p as l}from"./shared-e650caf3.js";import{i as s}from"./shared-53e42a77.js";import{s as n}from"./shared-af6ccc54.js";let m;function h(e){return new Array(7).fill(new Date).map(((t,a)=>{for(;t.getDay()!==a;)t.setDate(t.getDate()+1);return t.toLocaleDateString(e,{weekday:"short"})}))}function u(e){return new Array(7).fill(new Date).map(((t,a)=>{for(;t.getDay()!==a;)t.setDate(t.getDate()+1);return t.toLocaleDateString(e,{weekday:"long"})}))}t("vaadin-date-picker-text-field",a(m||(m=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto 1fr;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}:host([theme~=summary-item]) [part=clear-button]{transform:scale(1.5)}:host([has-value]) slot[name=suffix]{display:none}`)));let d,p=e=>e;customElements.define("foxy-internal-date-control",class extends e{constructor(){super(...arguments),this.hideClearButton=!1,this.format=null,this.layout=null,this.min=null}static get properties(){return o(o({},super.properties),{},{hideClearButton:{type:Boolean,attribute:"hide-clear-button",reflect:!0},format:{},layout:{},min:{}})}renderControl(){var e,t,a,o;let n;return n="0000-00-00"!==this._value&&this._value?"unix"===this.format?i(new Date(1e3*(null!==(e=this._value)&&void 0!==e?e:0))):"iso-long"===this.format?i(new Date(this._value)):(null!==(t=this._value)&&void 0!==t?t:"").substring(0,10):"",r(d||(d=p` <vaadin-date-picker error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" theme="${0}" min="${0}" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" .i18n="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-picker> `),s(this._errorMessage),this.placeholder,this.helperText,this.label,null!==(a=this.layout)&&void 0!==a?a:"standalone",s(null!==(o=this.min)&&void 0!==o?o:void 0),!this.hideClearButton,this.disabled,this.readonly,this._checkValidity,n,this.__pickerI18n,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{var t,a,r,o;const i=e.currentTarget;"unix"===this.format?this._value=Math.floor((null!==(a=null===(t=l(i.value))||void 0===t?void 0:t.getTime())&&void 0!==a?a:0)/1e3):"iso-long"===this.format?this._value=null!==(o=null===(r=l(i.value))||void 0===r?void 0:r.toISOString())&&void 0!==o?o:null:this._value=i.value}))}get __pickerI18n(){return{monthNames:(e=this.lang||"en",new Array(12).fill(null).map(((t,a)=>new Date(2e3,a,1).toLocaleDateString(e,{month:"long"})))),weekdays:u(this.lang||"en"),weekdaysShort:h(this.lang||"en"),firstDayOfWeek:0,week:this.t("week"),calendar:this.t("calendar"),clear:this.t("clear"),today:this.t("today"),cancel:this.t("cancel"),referenceDate:"",parseDate:null,formatTitle:(e,t)=>e+" "+t,formatDate:e=>this.t("display_value",{value:n(e.year,e.month,e.day)})};var e}});
@@ -1,4 +1,4 @@
1
- import{D as t,r as e,l as n,b as r,f as i,s,o,c as a,p as l,d as c,e as d,g as h,h as u,u as p,j as _,k as f,m,n as y}from"./shared-328aa161.js";
1
+ import{D as t,r as e,l as n,b as r,f as i,s,o,c as a,p as l,d as c,e as d,g as h,h as u,u as p,j as _,k as f,m,n as y}from"./shared-54380337.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -209,4 +209,4 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
209
209
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
210
210
  Code distributed by Google as part of the polymer project is also
211
211
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
212
- */mn({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){ln(this.info)},mousedown:function(t){if(!sn(t))return;let e=un(t),n=this;an(this.info,(function(t){sn(t)||(wn("up",e,t),ln(n.info))}),(function(t){sn(t)&&wn("up",e,t),ln(n.info)})),wn("down",e,t)},touchstart:function(t){wn("down",un(t),t.changedTouches[0],t)},touchend:function(t){wn("up",un(t),t.changedTouches[0],t)}}),mn({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,ln(this.info)},mousedown:function(t){if(!sn(t))return;let e=un(t),n=this,r=function(t){let r=t.clientX,i=t.clientY;vn(n.info,r,i)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&Pn("tap"),n.info.addMove({x:r,y:i}),sn(t)||(n.info.state="end",ln(n.info)),e&&Cn(n.info,e,t),n.info.started=!0)};an(this.info,r,(function(t){n.info.started&&r(t),ln(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart:function(t){let e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){let e=un(t),n=t.changedTouches[0],r=n.clientX,i=n.clientY;vn(this.info,r,i)&&("start"===this.info.state&&Pn("tap"),this.info.addMove({x:r,y:i}),Cn(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){let e=un(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),Cn(this.info,e,n))}}),mn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(t){sn(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){sn(t)&&Sn(this.info,t)},touchstart:function(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){Sn(this.info,t.changedTouches[0],t)}});const En=st((t=>class extends t{_addEventListenerToNode(t,e,n){_n(t,e,n)||super._addEventListenerToNode(t,e,n)}_removeEventListenerFromNode(t,e,n){fn(t,e,n)||super._removeEventListenerFromNode(t,e,n)}}));export{lt as A,bn as B,bt as C,Fe as D,ke as E,En as G,R as M,De as P,L as V,Nt as a,_n as b,z as c,B as d,He as e,Be as f,F as g,w as h,xt as i,M as j,D as k,Y as l,st as m,J as n,Ft as o,It as p,Re as q,Le as r,yn as s,At as t,k as u,ft as v,ot as w,xe as x,ut as y,ht as z};
212
+ */mn({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){ln(this.info)},mousedown:function(t){if(!sn(t))return;let e=un(t),n=this;an(this.info,(function(t){sn(t)||(wn("up",e,t),ln(n.info))}),(function(t){sn(t)&&wn("up",e,t),ln(n.info)})),wn("down",e,t)},touchstart:function(t){wn("down",un(t),t.changedTouches[0],t)},touchend:function(t){wn("up",un(t),t.changedTouches[0],t)}}),mn({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,ln(this.info)},mousedown:function(t){if(!sn(t))return;let e=un(t),n=this,r=function(t){let r=t.clientX,i=t.clientY;vn(n.info,r,i)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&Pn("tap"),n.info.addMove({x:r,y:i}),sn(t)||(n.info.state="end",ln(n.info)),e&&Cn(n.info,e,t),n.info.started=!0)};an(this.info,r,(function(t){n.info.started&&r(t),ln(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart:function(t){let e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){let e=un(t),n=t.changedTouches[0],r=n.clientX,i=n.clientY;vn(this.info,r,i)&&("start"===this.info.state&&Pn("tap"),this.info.addMove({x:r,y:i}),Cn(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){let e=un(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),Cn(this.info,e,n))}}),mn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(t){sn(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){sn(t)&&Sn(this.info,t)},touchstart:function(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){Sn(this.info,t.changedTouches[0],t)}});const En=st((t=>class extends t{_addEventListenerToNode(t,e,n){_n(t,e,n)||super._addEventListenerToNode(t,e,n)}_removeEventListenerFromNode(t,e,n){fn(t,e,n)||super._removeEventListenerFromNode(t,e,n)}}));export{lt as A,bn as B,Fe as D,ke as E,En as G,R as M,De as P,L as V,Nt as a,_n as b,z as c,B as d,He as e,Be as f,F as g,w as h,xt as i,M as j,D as k,Y as l,st as m,J as n,Ft as o,It as p,Re as q,Le as r,yn as s,At as t,k as u,ft as v,ot as w,xe as x,ut as y,ht as z};
@@ -1,4 +1,4 @@
1
- import{_ as t}from"./shared-8f9014ff.js";import{T as s}from"./shared-43fb8242.js";import{a as e}from"./shared-328aa161.js";import{p as n}from"./shared-56a16e03.js";import{g as a}from"./shared-96e4f603.js";import{c as o}from"./shared-4e709717.js";let r,l,m,i,u=t=>t;class c extends(e(s,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:s=>{const e=s.data._embedded["fx:transaction_template"],a=`${e.total_order} ${e.currency_code}`;return s.html(r||(r=u`
1
+ import{_ as t}from"./shared-8f9014ff.js";import{T as e}from"./shared-ee677138.js";import{a as s}from"./shared-54380337.js";import{p as n}from"./shared-ceeffa02.js";import{g as a}from"./shared-96e4f603.js";import{c as o}from"./shared-4e709717.js";let r,l,m,i,u=t=>t;class c extends(s(e,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:e=>{const s=e.data._embedded["fx:transaction_template"],a=`${s.total_order} ${s.currency_code}`;return e.html(r||(r=u`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n frequencies"
4
4
  class="font-medium text-m font-tnum"
@@ -8,7 +8,7 @@ import{_ as t}from"./shared-8f9014ff.js";import{T as s}from"./shared-43fb8242.js
8
8
  .options=${0}
9
9
  >
10
10
  </foxy-i18n>
11
- `),s.lang,".5m"===s.data.frequency?"twice_a_month":"recurring",s.ns,t(t({},n(s.data.frequency)),{},{amount:a}))}},c.summaryColumn={cell:t=>{const s=t.data._embedded["fx:transaction_template"]._embedded["fx:items"],e={count_minus_one:s.length-1,first_item:s[0],count:s.length};return t.html(l||(l=u`
11
+ `),e.lang,".5m"===e.data.frequency?"twice_a_month":"recurring",e.ns,t(t({},n(e.data.frequency)),{},{amount:a}))}},c.summaryColumn={cell:t=>{const e=t.data._embedded["fx:transaction_template"]._embedded["fx:items"],s={count_minus_one:e.length-1,first_item:e[0],count:e.length};return t.html(l||(l=u`
12
12
  <foxy-i18n
13
13
  data-testclass="i18n summaries"
14
14
  class="text-m"
@@ -18,7 +18,7 @@ import{_ as t}from"./shared-8f9014ff.js";import{T as s}from"./shared-43fb8242.js
18
18
  .options=${0}
19
19
  >
20
20
  </foxy-i18n>
21
- `),t.lang,t.ns,e)}},c.statusColumn={hideBelow:"sm",cell:({ns:t,lang:s,data:e,html:n})=>{const r=a(e),l="failed"===r,i="next_payment"===r||!!(null==r?void 0:r.startsWith("will_end"));return n(m||(m=u`
21
+ `),t.lang,t.ns,s)}},c.statusColumn={hideBelow:"sm",cell:({ns:t,lang:e,data:s,html:n})=>{const r=a(s),l="failed"===r,i="next_payment"===r||!!(null==r?void 0:r.startsWith("will_end"));return n(m||(m=u`
22
22
  <foxy-i18n
23
23
  data-testclass="i18n statuses"
24
24
  class=${0}
@@ -28,7 +28,7 @@ import{_ as t}from"./shared-8f9014ff.js";import{T as s}from"./shared-43fb8242.js
28
28
  .options=${0}
29
29
  >
30
30
  </foxy-i18n>
31
- `),o({"px-s py-xs text-m font-medium inline-block whitespace-normal rounded":!0,"text-secondary bg-contrast-5":!i&&!l,"text-success bg-success-10":i,"text-error bg-error-10":l}),s,r,t,e)}},c.subTokenURLColumn={cell:t=>t.html(i||(i=u`
31
+ `),o({"px-s py-xs text-m font-medium inline-block whitespace-normal rounded":!0,"text-secondary bg-contrast-5":!i&&!l,"text-success bg-success-10":i,"text-error bg-error-10":l}),e,r,t,s)}},c.subTokenURLColumn={cell:t=>t.html(i||(i=u`
32
32
  <a
33
33
  data-testclass="links"
34
34
  target="_blank"
@@ -0,0 +1 @@
1
+ import"./foxy-spinner.js";import{I as e}from"./shared-0682a41b.js";customElements.define("foxy-internal-card",e);
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./shared-26b55da2.js";import{_ as e,l as t}from"./shared-8f9014ff.js";import{C as r}from"./shared-41c9c53f.js";import{a as s,T as i,w as n}from"./shared-328aa161.js";import{h as l,r as o,L as h}from"./shared-ba5c42c7.js";import{I as a}from"./shared-930e68b7.js";import{N as p}from"./shared-fd8b44e3.js";import{s as u}from"./shared-791b4510.js";let c,d,_,f,v=e=>e;class y extends(r(s(i(a(h))))){constructor(){super(...arguments),this.nucleon=null}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return e(e({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,t){return"nucleon"===e&&t instanceof p?t:super.inferFromElement(e,t)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null,!1===(null===(r=this.nucleon)||void 0===r?void 0:r.in("idle"))&&(this.disabled=!0)}renderLightDom(){if("string"!=typeof this.infer)return;const e=l(c||(c=v` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);o(e,this)}updated(e){super.updated(e),this.renderLightDom()}renderControl(){return l(d||(d=v``))}render(){return this.hidden?l(_||(_=v``)):l(f||(f=v` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}function m(e){try{return JSON.parse(e)}catch(e){return null}}customElements.define("foxy-internal-control",y);class g extends y{constructor(){var e;super(...arguments),e=this,this.checkValidityAsync=null,this.jsonTemplate=null,this.jsonPath=null,this.getValue=()=>{var e;const r=t(null===(e=this.nucleon)||void 0===e?void 0:e.form,this.property);if(this.jsonPath){const e=m(r),s=m(this.jsonTemplate);return t(e,this.jsonPath,t(s,this.jsonPath))}return r},this.setValue=e=>{var t,r,s,i,n,l,o,h,a;const[p,...c]=this.property.split(".");if(c.length){const l=null!==(r=null===(t=this.nucleon)||void 0===t?void 0:t.form[p])&&void 0!==r?r:{};if(this.jsonPath){const t=null!==(i=m(null===(s=this.nucleon)||void 0===s?void 0:s.form[p]))&&void 0!==i?i:m(this.jsonTemplate);u(t,this.jsonPath,e),u(l,c,JSON.stringify(t))}else u(l,c,e);null===(n=this.nucleon)||void 0===n||n.edit({[p]:l})}else if(this.jsonPath){const t=null!==(o=m(null===(l=this.nucleon)||void 0===l?void 0:l.form[p]))&&void 0!==o?o:m(this.jsonTemplate);u(t,this.jsonPath,e),null===(h=this.nucleon)||void 0===h||h.edit({[p]:JSON.stringify(t)})}else null===(a=this.nucleon)||void 0===a||a.edit({[p]:e})},this.__debouncedCheckValidityAsync=n((async function(t){var r;const s=await(null===(r=e.checkValidityAsync)||void 0===r?void 0:r.call(e,t));e._value===t&&(e.__asyncError=!0===s?null:null!=s?s:null)}),300),this.__previousValue=null,this.__placeholder=null,this.__helperText=null,this.__asyncError=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return e(e({},super.properties),{},{checkValidityAsync:{attribute:!1},jsonTemplate:{attribute:"json-template"},placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},jsonPath:{attribute:"json-path"},getValue:{attribute:!1},setValue:{attribute:!1},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0},__asyncError:{attribute:!1}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){const t=this.__placeholder;this.__placeholder=e,this.requestUpdate("placeholder",t)}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){const t=this.__helperText;this.__helperText=e,this.requestUpdate("helperText",t)}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){const t=this.__v8nPrefix;this.__v8nPrefix=e,this.requestUpdate("v8nPrefix",t)}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){const t=this.__property;this.__property=e,this.requestUpdate("property",t)}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){const t=this.__label;this.__label=e,this.requestUpdate("label",t)}resetPlaceholder(){const e=this.__placeholder;this.__placeholder=null,this.requestUpdate("placeholder",e)}resetHelperText(){const e=this.__helperText;this.__helperText=null,this.requestUpdate("helperText",e)}resetV8nPrefix(){const e=this.__v8nPrefix;this.__v8nPrefix=null,this.requestUpdate("v8nPrefix",e)}resetProperty(){const e=this.__property;this.__property=null,this.requestUpdate("property",e)}resetLabel(){const e=this.__label;this.__label=null,this.requestUpdate("label",e)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode())}get _value(){return this.getValue()}set _value(e){this.__previousValue=this._value,this.__asyncError=null,this._error||this.__previousValue===e||this.__debouncedCheckValidityAsync(e);const t=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(t)&&this.setValue(e)}get _error(){var e,t;const r=null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)));return null!==(t=null!=r?r:this.__asyncError)&&void 0!==t?t:void 0}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",g);export{g as I,y as a};
1
+ import"./shared-5212ef4f.js";import"./shared-bf03e2e9.js";import{_ as e,l as t}from"./shared-8f9014ff.js";import{C as r}from"./shared-41c9c53f.js";import{a as s,T as i,w as n}from"./shared-54380337.js";import{h as l,r as o,L as h}from"./shared-ba5c42c7.js";import{I as a}from"./shared-930e68b7.js";import{N as p}from"./shared-fd8b44e3.js";import{s as u}from"./shared-791b4510.js";let c,d,_,f,v=e=>e;class y extends(r(s(i(a(h))))){constructor(){super(...arguments),this.nucleon=null}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return e(e({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,t){return"nucleon"===e&&t instanceof p?t:super.inferFromElement(e,t)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null,!1===(null===(r=this.nucleon)||void 0===r?void 0:r.in("idle"))&&(this.disabled=!0)}renderLightDom(){if("string"!=typeof this.infer)return;const e=l(c||(c=v` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);o(e,this)}updated(e){super.updated(e),this.renderLightDom()}renderControl(){return l(d||(d=v``))}render(){return this.hidden?l(_||(_=v``)):l(f||(f=v` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}function m(e){try{return JSON.parse(e)}catch(e){return null}}customElements.define("foxy-internal-control",y);class g extends y{constructor(){var e;super(...arguments),e=this,this.checkValidityAsync=null,this.jsonTemplate=null,this.jsonPath=null,this.getValue=()=>{var e;const r=t(null===(e=this.nucleon)||void 0===e?void 0:e.form,this.property);if(this.jsonPath){const e=m(r),s=m(this.jsonTemplate);return t(e,this.jsonPath,t(s,this.jsonPath))}return r},this.setValue=e=>{var t,r,s,i,n,l,o,h,a;const[p,...c]=this.property.split(".");if(c.length){const l=null!==(r=null===(t=this.nucleon)||void 0===t?void 0:t.form[p])&&void 0!==r?r:{};if(this.jsonPath){const t=null!==(i=m(null===(s=this.nucleon)||void 0===s?void 0:s.form[p]))&&void 0!==i?i:m(this.jsonTemplate);u(t,this.jsonPath,e),u(l,c,JSON.stringify(t))}else u(l,c,e);null===(n=this.nucleon)||void 0===n||n.edit({[p]:l})}else if(this.jsonPath){const t=null!==(o=m(null===(l=this.nucleon)||void 0===l?void 0:l.form[p]))&&void 0!==o?o:m(this.jsonTemplate);u(t,this.jsonPath,e),null===(h=this.nucleon)||void 0===h||h.edit({[p]:JSON.stringify(t)})}else null===(a=this.nucleon)||void 0===a||a.edit({[p]:e})},this.__debouncedCheckValidityAsync=n((async function(t){var r;const s=await(null===(r=e.checkValidityAsync)||void 0===r?void 0:r.call(e,t));e._value===t&&(e.__asyncError=!0===s?null:null!=s?s:null)}),300),this.__previousValue=null,this.__placeholder=null,this.__helperText=null,this.__asyncError=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return e(e({},super.properties),{},{checkValidityAsync:{attribute:!1},jsonTemplate:{attribute:"json-template"},placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},jsonPath:{attribute:"json-path"},getValue:{attribute:!1},setValue:{attribute:!1},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0},__asyncError:{attribute:!1}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){const t=this.__placeholder;this.__placeholder=e,this.requestUpdate("placeholder",t)}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){const t=this.__helperText;this.__helperText=e,this.requestUpdate("helperText",t)}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){const t=this.__v8nPrefix;this.__v8nPrefix=e,this.requestUpdate("v8nPrefix",t)}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){const t=this.__property;this.__property=e,this.requestUpdate("property",t)}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){const t=this.__label;this.__label=e,this.requestUpdate("label",t)}resetPlaceholder(){const e=this.__placeholder;this.__placeholder=null,this.requestUpdate("placeholder",e)}resetHelperText(){const e=this.__helperText;this.__helperText=null,this.requestUpdate("helperText",e)}resetV8nPrefix(){const e=this.__v8nPrefix;this.__v8nPrefix=null,this.requestUpdate("v8nPrefix",e)}resetProperty(){const e=this.__property;this.__property=null,this.requestUpdate("property",e)}resetLabel(){const e=this.__label;this.__label=null,this.requestUpdate("label",e)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode())}get _value(){return this.getValue()}set _value(e){this.__previousValue=this._value,this.__asyncError=null,this._error||this.__previousValue===e||this.__debouncedCheckValidityAsync(e);const t=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(t)&&this.setValue(e)}get _error(){var e,t;const r=null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)));return null!==(t=null!=r?r:this.__asyncError)&&void 0!==t?t:void 0}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",g);export{g as I,y as a};
@@ -1,4 +1,4 @@
1
- import{aq as e,ar as t,as as s,at as a,au as i,av as n,aw as r,ax as l,o,ay as d,az as A,aA as u,aB as h,aC as c,aD as m,aE as p,m as v,_ as g,aF as y}from"./shared-8f9014ff.js";import"./shared-18e301f2.js";import"./shared-b0db52f7.js";import"./shared-6880e1f6.js";import"./shared-f9bb0924.js";import{T as b}from"./shared-910d49eb.js";import"./shared-aa258319.js";import"./shared-ee752063.js";import{d as _,P as f,A as x,c as w,h as E,L as k}from"./shared-ba5c42c7.js";import"./shared-d74aac59.js";import{O as C}from"./shared-ad470adf.js";import{p as S}from"./shared-26b55da2.js";import{a as $,y as I,x as T,z as B}from"./shared-328aa161.js";import{I as M}from"./shared-930e68b7.js";import{s as V}from"./shared-53e476fd.js";import{i as D}from"./shared-0e19bda5.js";import"./shared-d48e260f.js";import"./shared-5fbbaea2.js";import"./shared-ba43928a.js";import{h as j,P as L}from"./shared-021fbb51.js";import{E as Q,T as P}from"./shared-9a291941.js";import{L as R}from"./shared-e9d87207.js";import{C as O}from"./shared-be071e3d.js";import{b as q}from"./shared-3c0e3876.js";import"./shared-83613f15.js";import{a as F,F as N}from"./shared-8dd6e5cc.js";var U={raise:e,send:t,sendParent:s,sendUpdate:a,log:i,cancel:n,start:r,stop:l,assign:o,after:d,done:A,respond:u,forwardTo:h,escalate:c,choose:m,pure:p};const G=_((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 f)s[a]!==e&&t.setValue(e);else{if(!(t instanceof x))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class W extends CustomEvent{constructor(e){super("change",{detail:e})}}class H extends CustomEvent{constructor(e){super("change",{detail:e})}}class Y extends CustomEvent{constructor(e){super("change",{detail:e})}}class K extends Y{}class J extends H{}let z,Z,X=e=>e;class ee extends($(M(k))){constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:s}=S(e);return[t.toString(),s]}},this.__getItems=v((e=>{const t=S(e).count;return[{value:"d",label:this.t("day",{count:t})},{value:"w",label:this.t("week",{count:t})},{value:"m",label:this.t("month",{count:t})},{value:"y",label:this.t("year",{count:t})}]}))}static get properties(){return g(g({},super.properties),{},{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String}})}static get styles(){return w(z||(z=X`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}render(){return E(Z||(Z=X` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,G(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}checkValidity(){return!0}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new J(this.value))}}const te=y({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"number",cond:"showsNumberField"},{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}},number:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsNumberField:e=>"number"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:U.assign({defaultCustomValue:(e,t)=>t.data}),setValue:U.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:U.assign({custom:(e,t)=>t.data}),setItems:U.assign({items:(e,t)=>t.data}),setType:U.assign({type:(e,t)=>t.data}),setMin:U.assign({min:(e,t)=>t.data}),setMax:U.assign({max:(e,t)=>t.data})}});let se,ae,ie,ne,re,le,oe,de,Ae,ue,he,ce,me,pe,ve=e=>e;const ge=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class ye extends I{constructor(){super(...arguments),this.getText=e=>e,this.__service=D(te).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-number-field":customElements.get("vaadin-number-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":ee,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,w(ie||(ie=ve`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return g(g({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,ge]:this.items,t=Array.isArray(this.value),s=this.__service.state.matches("extension.present.selected"),a=E(ne||(ne=ve` ${0} `),e.map(((e,a,i)=>{var n;const r=this.custom&&a===i.length-1,l=r?s:t?!!(null===(n=this.value)||void 0===n?void 0:n.includes(e)):e===String(this.value),o=this.disabled||!this._isI18nReady,d=V({value:r?ge:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":o,"@change":t=>{if(this.readonly)return t.preventDefault();const s=t.target.checked,a=e===ge?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===ge?s?[...i,a]:i.slice(0,i.length-1):s?[a,...i]:i.filter((e=>e!==a)):this.value=s?a:null,this.dispatchEvent(new W(this.value))}}),A=E(re||(re=ve` <div> ${0} </div> `),e===ge?this._t("choice.other").toString():E(le||(le=ve`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return E(oe||(oe=ve` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),a?"":"hidden",t?function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} transform ${s?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return E(ae||(ae=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A):function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} ${t||e?"":"shadow-xs"} transform ${s?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return E(se||(se=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A),e===ge&&s?this.__field:"",e!==ge?E(de||(de=ve`<slot name="${0}"></slot>`),e):"")})));return E(Ae||(Ae=ve`<form>${0}</form> `),a)}get __field(){const e=V({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new W(this.value))}});return"frequency"===this.type?E(ue||(ue=ve`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?E(he||(he=ve`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"number"===this.type?E(ce||(ce=ve`<vaadin-number-field ...="${0}" has-controls></vaadin-number-field>`),e):"textarea"===this.type?E(me||(me=ve`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):E(pe||(pe=ve`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}const be=j`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
1
+ import{aq as e,ar as t,as as s,at as a,au as i,av as n,aw as r,ax as l,o,ay as d,az as A,aA as u,aB as h,aC as c,aD as m,aE as p,m as v,_ as g,aF as y}from"./shared-8f9014ff.js";import"./shared-b7f25c69.js";import"./shared-bc110f4a.js";import"./shared-f4738502.js";import"./shared-d3205195.js";import{T as b}from"./shared-02fb8ce3.js";import"./shared-462820a3.js";import"./shared-d80549b6.js";import{d as f,P as _,A as x,c as w,h as E,L as k}from"./shared-ba5c42c7.js";import"./shared-09acffe6.js";import{O as C}from"./shared-58fdefe5.js";import{p as S}from"./shared-bf03e2e9.js";import{a as $,y as I,x as T,z as B}from"./shared-54380337.js";import{I as M}from"./shared-930e68b7.js";import{s as V}from"./shared-53e476fd.js";import{i as D}from"./shared-0e19bda5.js";import"./shared-d53f94a0.js";import"./shared-fe73af3a.js";import"./shared-9ee4873a.js";import{h as j,P as L}from"./shared-5b1ad45f.js";import{E as Q,T as P}from"./shared-9cf7a458.js";import{L as R}from"./shared-36010fae.js";import{C as O}from"./shared-a1d07d0c.js";import{b as q}from"./shared-91fbd884.js";import"./shared-9dc6233c.js";import{a as F,F as N}from"./shared-2463790e.js";var U={raise:e,send:t,sendParent:s,sendUpdate:a,log:i,cancel:n,start:r,stop:l,assign:o,after:d,done:A,respond:u,forwardTo:h,escalate:c,choose:m,pure:p};const G=f((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 _)s[a]!==e&&t.setValue(e);else{if(!(t instanceof x))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class W extends CustomEvent{constructor(e){super("change",{detail:e})}}class H extends CustomEvent{constructor(e){super("change",{detail:e})}}class Y extends CustomEvent{constructor(e){super("change",{detail:e})}}class K extends Y{}class J extends H{}let z,Z,X=e=>e;class ee extends($(M(k))){constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:s}=S(e);return[t.toString(),s]}},this.__getItems=v((e=>{const t=S(e).count;return[{value:"d",label:this.t("day",{count:t})},{value:"w",label:this.t("week",{count:t})},{value:"m",label:this.t("month",{count:t})},{value:"y",label:this.t("year",{count:t})}]}))}static get properties(){return g(g({},super.properties),{},{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String}})}static get styles(){return w(z||(z=X`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}render(){return E(Z||(Z=X` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,G(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}checkValidity(){return!0}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new J(this.value))}}const te=y({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"number",cond:"showsNumberField"},{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}},number:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsNumberField:e=>"number"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:U.assign({defaultCustomValue:(e,t)=>t.data}),setValue:U.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:U.assign({custom:(e,t)=>t.data}),setItems:U.assign({items:(e,t)=>t.data}),setType:U.assign({type:(e,t)=>t.data}),setMin:U.assign({min:(e,t)=>t.data}),setMax:U.assign({max:(e,t)=>t.data})}});let se,ae,ie,ne,re,le,oe,de,Ae,ue,he,ce,me,pe,ve=e=>e;const ge=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class ye extends I{constructor(){super(...arguments),this.getText=e=>e,this.__service=D(te).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-number-field":customElements.get("vaadin-number-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":ee,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,w(ie||(ie=ve`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return g(g({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,ge]:this.items,t=Array.isArray(this.value),s=this.__service.state.matches("extension.present.selected"),a=E(ne||(ne=ve` ${0} `),e.map(((e,a,i)=>{var n;const r=this.custom&&a===i.length-1,l=r?s:t?!!(null===(n=this.value)||void 0===n?void 0:n.includes(e)):e===String(this.value),o=this.disabled||!this._isI18nReady,d=V({value:r?ge:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":o,"@change":t=>{if(this.readonly)return t.preventDefault();const s=t.target.checked,a=e===ge?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===ge?s?[...i,a]:i.slice(0,i.length-1):s?[a,...i]:i.filter((e=>e!==a)):this.value=s?a:null,this.dispatchEvent(new W(this.value))}}),A=E(re||(re=ve` <div> ${0} </div> `),e===ge?this._t("choice.other").toString():E(le||(le=ve`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return E(oe||(oe=ve` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),a?"":"hidden",t?function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} transform ${s?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return E(ae||(ae=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A):function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} ${t||e?"":"shadow-xs"} transform ${s?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return E(se||(se=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A),e===ge&&s?this.__field:"",e!==ge?E(de||(de=ve`<slot name="${0}"></slot>`),e):"")})));return E(Ae||(Ae=ve`<form>${0}</form> `),a)}get __field(){const e=V({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new W(this.value))}});return"frequency"===this.type?E(ue||(ue=ve`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?E(he||(he=ve`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"number"===this.type?E(ce||(ce=ve`<vaadin-number-field ...="${0}" has-controls></vaadin-number-field>`),e):"textarea"===this.type?E(me||(me=ve`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):E(pe||(pe=ve`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}const be=j`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -82,12 +82,12 @@ import{aq as e,ar as t,as as s,at as a,au as i,av as n,aw as r,ax as l,o,ay as d
82
82
  Copyright (c) 2019 Vaadin Ltd.
83
83
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
84
84
  */
85
- const _e=e=>class extends(R(e)){static get properties(){return{multiple:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_multipleChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}}}static get observers(){return["_enhanceMultipleItems(items, multiple, selected, selectedValues, selectedValues.*)"]}ready(){this.addEventListener("click",(e=>this._onMultipleClick(e))),super.ready()}_enhanceMultipleItems(e,t,s,a){if(e&&t){if(a){const t=a.map((t=>e[t]));e.forEach((e=>e.selected=-1!==t.indexOf(e)))}this._scrollToLastSelectedItem()}}_scrollToLastSelectedItem(){const e=this.selectedValues.slice(-1)[0];e&&!e.disabled&&this._scrollToItem(e)}_onMultipleClick(e){const t=this._filterItems(e.composedPath())[0],s=t&&!t.disabled?this.items.indexOf(t):-1;s<0||!this.multiple||(e.preventDefault(),-1!==this.selectedValues.indexOf(s)?this.selectedValues=this.selectedValues.filter((e=>e!==s)):this.selectedValues=this.selectedValues.concat(s))}_multipleChanged(e,t){!e&&t&&(this.selectedValues=[],this.items.forEach((e=>e.selected=!1))),e&&!t&&void 0!==this.selected&&(this.push("selectedValues",this.selected),this.selected=void 0)}}
85
+ const fe=e=>class extends(R(e)){static get properties(){return{multiple:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_multipleChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}}}static get observers(){return["_enhanceMultipleItems(items, multiple, selected, selectedValues, selectedValues.*)"]}ready(){this.addEventListener("click",(e=>this._onMultipleClick(e))),super.ready()}_enhanceMultipleItems(e,t,s,a){if(e&&t){if(a){const t=a.map((t=>e[t]));e.forEach((e=>e.selected=-1!==t.indexOf(e)))}this._scrollToLastSelectedItem()}}_scrollToLastSelectedItem(){const e=this.selectedValues.slice(-1)[0];e&&!e.disabled&&this._scrollToItem(e)}_onMultipleClick(e){const t=this._filterItems(e.composedPath())[0],s=t&&!t.disabled?this.items.indexOf(t):-1;s<0||!this.multiple||(e.preventDefault(),-1!==this.selectedValues.indexOf(s)?this.selectedValues=this.selectedValues.filter((e=>e!==s)):this.selectedValues=this.selectedValues.concat(s))}_multipleChanged(e,t){!e&&t&&(this.selectedValues=[],this.items.forEach((e=>e.selected=!1))),e&&!t&&void 0!==this.selected&&(this.push("selectedValues",this.selected),this.selected=void 0)}}
86
86
  /**
87
87
  @license
88
88
  Copyright (c) 2017 Vaadin Ltd.
89
89
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
90
- */;class fe extends(Q(_e(P(L)))){static get template(){return j`
90
+ */;class _e extends(Q(fe(P(L)))){static get template(){return j`
91
91
  <style>
92
92
  :host {
93
93
  display: flex;
@@ -107,7 +107,7 @@ This program is available under Apache License Version 2.0, available at https:/
107
107
  <div part="items">
108
108
  <slot></slot>
109
109
  </div>
110
- `}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof L||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(fe.is,fe);const xe=j`<dom-module id="lumo-select" theme-for="vaadin-select">
110
+ `}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof L||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(_e.is,_e);const xe=j`<dom-module id="lumo-select" theme-for="vaadin-select">
111
111
  <template>
112
112
  <style include="lumo-field-button">
113
113
  :host {
@@ -1,4 +1,4 @@
1
- import"./shared-b0db52f7.js";import"./shared-5fbbaea2.js";import{h as e,G as t,P as a,D as i,t as s,b as o,s as r}from"./shared-021fbb51.js";import{C as n}from"./shared-be071e3d.js";import"./shared-d48e260f.js";import"./shared-ba43928a.js";import{T as l}from"./shared-910d49eb.js";import"./shared-83613f15.js";import{T as d,D as h,E as u}from"./shared-9a291941.js";import{O as c,I as p,a as m}from"./shared-ad470adf.js";import{D as _,t as f,f as v,a as g}from"./shared-8dd6e5cc.js";import{a as y,b}from"./shared-3c0e3876.js";const D=e`<dom-module id="lumo-date-picker-overlay" theme-for="vaadin-date-picker-overlay">
1
+ import"./shared-bc110f4a.js";import"./shared-fe73af3a.js";import{h as e,G as t,P as a,D as i,t as s,b as o,s as r}from"./shared-5b1ad45f.js";import{C as n}from"./shared-a1d07d0c.js";import"./shared-d53f94a0.js";import"./shared-9ee4873a.js";import{T as l}from"./shared-02fb8ce3.js";import"./shared-9dc6233c.js";import{T as d,D as h,E as u}from"./shared-9cf7a458.js";import{O as c,I as p,a as m}from"./shared-58fdefe5.js";import{D as _,t as f,f as v,a as g}from"./shared-2463790e.js";import{a as y,b}from"./shared-91fbd884.js";const D=e`<dom-module id="lumo-date-picker-overlay" theme-for="vaadin-date-picker-overlay">
2
2
  <template>
3
3
  <style include="lumo-menu-overlay">
4
4
  [part="overlay"] {
@@ -801,4 +801,4 @@ This program is available under Apache License Version 2.0, available at https:/
801
801
 
802
802
  <iron-media-query query="[[_fullscreenMediaQuery]]" query-matches="{{_fullscreen}}">
803
803
  </iron-media-query>
804
- `}static get is(){return"vaadin-date-picker"}static get version(){return"4.6.0"}static get properties(){return{clearButtonVisible:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},errorMessage:String,placeholder:String,helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_userInputValue:String}}static get observers(){return["_userInputValueChanged(_userInputValue)","_setClearButtonLabel(i18n.clear)"]}ready(){super.ready(),y(this,(()=>this._inputElement.validate=()=>{})),this._inputElement.addEventListener("change",(e=>{""!==this._inputElementValue||e.__fromClearButton||(this.__dispatchChange=!0)}))}_onVaadinOverlayClose(e){this._openedWithFocusRing&&this.hasAttribute("focused")?this.focusElement.setAttribute("focus-ring",""):this.hasAttribute("focused")||this.focusElement.blur(),e.detail.sourceEvent&&-1!==e.detail.sourceEvent.composedPath().indexOf(this)&&e.preventDefault()}_toggle(e){e.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_input(){return this.$.input}_getAriaExpanded(e){return Boolean(e).toString()}get focusElement(){return this._input()||this}_setClearButtonLabel(e){this._inputElement.shadowRoot.querySelector('[part="clear-button"]').setAttribute("aria-label",e)}}customElements.define(Y.is,Y);export{Y as D,T as a};
804
+ `}static get is(){return"vaadin-date-picker"}static get version(){return"4.6.0"}static get properties(){return{clearButtonVisible:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},errorMessage:String,placeholder:String,helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_userInputValue:String}}static get observers(){return["_userInputValueChanged(_userInputValue)","_setClearButtonLabel(i18n.clear)"]}ready(){super.ready(),y(this,(()=>this._inputElement.validate=()=>{})),this._inputElement.addEventListener("change",(e=>{""!==this._inputElementValue||e.__fromClearButton||(this.__dispatchChange=!0)}))}_onVaadinOverlayClose(e){this._openedWithFocusRing&&this.hasAttribute("focused")?this.focusElement.setAttribute("focus-ring",""):this.hasAttribute("focused")||this.focusElement.blur(),e.detail.sourceEvent&&-1!==e.detail.sourceEvent.composedPath().indexOf(this)&&e.preventDefault()}_toggle(e){e.stopPropagation(),this[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_input(){return this.$.input}_getAriaExpanded(e){return Boolean(e).toString()}get focusElement(){return this._input()||this}_setClearButtonLabel(e){this._inputElement.shadowRoot.querySelector('[part="clear-button"]').setAttribute("aria-label",e)}}customElements.define(Y.is,Y);export{Y as D};
@@ -1 +1 @@
1
- import{_ as e}from"./shared-8f9014ff.js";import{B as t}from"./shared-be071e3d.js";import{c as r,h as s}from"./shared-ba5c42c7.js";import{y as n}from"./shared-328aa161.js";import{I as o}from"./shared-47ce4456.js";let i,a,l,c=e=>e;class d{constructor(e="unknown"){this.type=e}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":t,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,r(i||(i=c`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return e(e({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return s(a||(a=c` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?s(l||(l=c` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
1
+ import{_ as t}from"./shared-8f9014ff.js";import{B as e}from"./shared-a1d07d0c.js";import{c as r,h as s}from"./shared-ba5c42c7.js";import{y as n}from"./shared-54380337.js";import{I as o}from"./shared-6545a38f.js";let i,a,l,c=t=>t;class d{constructor(t="unknown"){this.type=t}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":e,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,r(i||(i=c`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return t(t({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return s(a||(a=c` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?s(l||(l=c` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
@@ -1 +1 @@
1
- import"./shared-b0db52f7.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
1
+ import"./shared-bc110f4a.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
@@ -1 +1 @@
1
- import"./shared-be071e3d.js";import"./shared-26b55da2.js";import{a as e}from"./shared-9a454e09.js";import{h as t}from"./shared-ba5c42c7.js";import{l as r,_ as i,B as s}from"./shared-8f9014ff.js";import"./shared-4cc1fb20.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import{g as n}from"./shared-bab2ea2c.js";import{C as a}from"./shared-41c9c53f.js";import{T as o}from"./shared-328aa161.js";import{N as l}from"./shared-fd8b44e3.js";import{c as d}from"./shared-4e709717.js";let c,f=e=>e;customElements.define("foxy-internal-timestamps-control",class extends e{renderControl(){return t(c||(c=f` <p class="font-lumo text-s leading-s text-secondary"> <foxy-i18n infer="" key="date_created"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> <span>&bull;<span> <foxy-i18n infer="" key="date_modified"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> </span></span></p> `),{value:r(this,"nucleon.data.date_created")},{value:r(this,"nucleon.data.date_modified")})}});let h,u=e=>e;customElements.define("foxy-internal-submit-control",class extends e{constructor(){super(...arguments),this.theme="primary"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(h||(h=u` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}});let p,y=e=>e;customElements.define("foxy-internal-delete-control",class extends e{constructor(){super(...arguments),this.theme="error"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(p||(p=y` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let m,x=e=>e;customElements.define("foxy-internal-undo-control",class extends e{constructor(){super(...arguments),this.theme="secondary"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(m||(m=x` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.undo()}))}});let b,g,v,$,k,S,_,j,E,O,T,C,w,B,K=e=>e;const H=a(o(l));class I extends H{constructor(){super(...arguments),this.status=null}static get properties(){return i(i({},super.properties),{},{status:{type:Object}})}renderHeaderActions(e){return null}get headerTitleKey(){return"title"}get headerTitleOptions(){return i(i({},this.data),{},{context:this.data?"existing":"new",id:this.data?n(this.data._links.self.href):null})}get headerSubtitleKey(){return"subtitle"}get headerSubtitleOptions(){var e;return null!==(e=this.data)&&void 0!==e?e:{}}get headerSubtitleBadges(){return[]}get headerCopyIdValue(){var e;return this.data&&null!==(e=n(this.data._links.self.href))&&void 0!==e?e:""}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href&&e.unshift("create"),this.href||e.unshift("delete","timestamps","submit"),this.in({idle:{snapshot:"dirty"}})||e.unshift("undo","submit"),new s(e.join(" ").trim())}renderHeader(){if(this.hiddenSelector.matches("header",!0))return t(b||(b=K``));const e=this.data,r=e?this.renderHeaderActions(e):null;return t(g||(g=K` <div> ${0} <h2 class="grid gap-xs"> <span class="flex items-center gap-s leading-none text-xl font-medium break-all"> <foxy-i18n options="${0}" infer="header" key="${0}"> </foxy-i18n> ${0} </span> ${0} </h2> ${0} </div> `),this.renderTemplateOrSlot("header:before"),JSON.stringify(this.headerTitleOptions),this.headerTitleKey,e?t(v||(v=K` ${0} ${0} `),this.hiddenSelector.matches("header:copy-id",!0)?"":t($||($=K` <foxy-copy-to-clipboard infer="header copy-id" class="text-m" text="${0}"> </foxy-copy-to-clipboard> `),this.headerCopyIdValue),this.hiddenSelector.matches("header:copy-json",!0)?"":t(k||(k=K` <foxy-copy-to-clipboard infer="header copy-json" class="text-m" icon="icons:code" text="${0}"> </foxy-copy-to-clipboard> `),JSON.stringify(e,null,2))):"",e?t(S||(S=K` <div class="flex flex-wrap items-center gap-s leading-xs"> ${0} <foxy-i18n infer="header" class="text-secondary" key="${0}" .options="${0}"> </foxy-i18n> </div> ${0} `),this.headerSubtitleBadges.map((e=>{var r;return t(_||(_=K` <span data-testclass="badge" class="${0}"> ${0} ${0} </span> `),d({"inline-flex gap-xs items-center rounded-s px-xs":!0,[null!==(r=e.class)&&void 0!==r?r:"bg-contrast-5"]:!0}),e.icon,"text"in e?e.text:t(j||(j=K`<foxy-i18n infer="header badges" key="${0}"></foxy-i18n>`),e.key))})),this.headerSubtitleKey,this.headerSubtitleOptions,r?t(E||(E=K`<div class="flex gap-x-m">${0}</div>`),r):""):"",this.renderTemplateOrSlot("header:after"))}renderBody(){return t(O||(O=K` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> <div class="w-full"></div> <foxy-internal-undo-control infer="undo"> </foxy-internal-undo-control> <foxy-internal-submit-control infer="submit"> </foxy-internal-submit-control> <foxy-internal-submit-control infer="create" theme="primary success"> </foxy-internal-submit-control> </div> `),["delete","undo","submit","create"].every((e=>this.hiddenSelector.matches(e,!0))))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return t(T||(T=K` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> ${0} </div> </div> `),this.in("busy"),d({"space-y-m":!0,"transition-all filter":!0,"opacity-30 blur-sm pointer-events-none":e}),this.__generalErrors.map((e=>this.__renderGeneralError(e))),this.status?this.__renderStatus(this.status):"",this.renderBody(),d({"flex flex-col items-center justify-center gap-m":!0,"transition-opacity absolute inset-0":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy",this.href&&this.in("fail")?t(C||(C=K` <vaadin-button theme="small contrast" @click="${0}"> <foxy-i18n infer="spinner" key="refresh"></foxy-i18n> </vaadin-button> `),(()=>this.refresh())):"")}get __generalErrors(){const e=this.constructor.generalErrorPrefix;return this.errors.filter((t=>t.startsWith(e)))}__renderGeneralError(e){return t(w||(w=K` <foxy-i18n class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" infer="error" key="${0}"> </foxy-i18n> `),e.replace("error:",""))}__renderStatus({key:e,options:r}){if(!this.hiddenSelector.matches("status",!0))return t(B||(B=K` <p data-testid="status" class="leading-xs text-body rounded bg-success-10 flex items-start gap-m" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n class="flex-1" infer="status" key="${0}" .options="${0}"></foxy-i18n> <vaadin-button class="flex-shrink-0" theme="success tertiary-inline" @click="${0}"> <foxy-i18n class="flex-1" infer="status" key="close"></foxy-i18n> </vaadin-button> </p> `),e,r,(()=>this.status=null))}}I.generalErrorPrefix="error:",customElements.define("foxy-internal-form",I);export{I};
1
+ import"./shared-a1d07d0c.js";import"./shared-bf03e2e9.js";import{a as e}from"./shared-650b8749.js";import{h as t}from"./shared-ba5c42c7.js";import{l as r,_ as i,B as s}from"./shared-8f9014ff.js";import"./shared-2a5c640b.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import{g as n}from"./shared-bab2ea2c.js";import{C as a}from"./shared-41c9c53f.js";import{T as o}from"./shared-54380337.js";import{N as l}from"./shared-fd8b44e3.js";import{c as d}from"./shared-4e709717.js";let c,f=e=>e;customElements.define("foxy-internal-timestamps-control",class extends e{renderControl(){return t(c||(c=f` <p class="font-lumo text-s leading-s text-secondary"> <foxy-i18n infer="" key="date_created"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> <span>&bull;<span> <foxy-i18n infer="" key="date_modified"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> </span></span></p> `),{value:r(this,"nucleon.data.date_created")},{value:r(this,"nucleon.data.date_modified")})}});let h,u=e=>e;customElements.define("foxy-internal-submit-control",class extends e{constructor(){super(...arguments),this.theme="primary"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(h||(h=u` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}});let p,y=e=>e;customElements.define("foxy-internal-delete-control",class extends e{constructor(){super(...arguments),this.theme="error"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(p||(p=y` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let m,x=e=>e;customElements.define("foxy-internal-undo-control",class extends e{constructor(){super(...arguments),this.theme="secondary"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(m||(m=x` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.undo()}))}});let b,g,v,$,k,S,_,j,E,O,T,C,w,B,K=e=>e;const H=a(o(l));class I extends H{constructor(){super(...arguments),this.status=null}static get properties(){return i(i({},super.properties),{},{status:{type:Object}})}renderHeaderActions(e){return null}get headerTitleKey(){return"title"}get headerTitleOptions(){return i(i({},this.data),{},{context:this.data?"existing":"new",id:this.data?n(this.data._links.self.href):null})}get headerSubtitleKey(){return"subtitle"}get headerSubtitleOptions(){var e;return null!==(e=this.data)&&void 0!==e?e:{}}get headerSubtitleBadges(){return[]}get headerCopyIdValue(){var e;return this.data&&null!==(e=n(this.data._links.self.href))&&void 0!==e?e:""}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href&&e.unshift("create"),this.href||e.unshift("delete","timestamps","submit"),this.in({idle:{snapshot:"dirty"}})||e.unshift("undo","submit"),new s(e.join(" ").trim())}renderHeader(){if(this.hiddenSelector.matches("header",!0))return t(b||(b=K``));const e=this.data,r=e?this.renderHeaderActions(e):null;return t(g||(g=K` <div> ${0} <h2 class="grid gap-xs"> <span class="flex items-center gap-s leading-none text-xl font-medium break-all"> <foxy-i18n options="${0}" infer="header" key="${0}"> </foxy-i18n> ${0} </span> ${0} </h2> ${0} </div> `),this.renderTemplateOrSlot("header:before"),JSON.stringify(this.headerTitleOptions),this.headerTitleKey,e?t(v||(v=K` ${0} ${0} `),this.hiddenSelector.matches("header:copy-id",!0)?"":t($||($=K` <foxy-copy-to-clipboard infer="header copy-id" class="text-m" text="${0}"> </foxy-copy-to-clipboard> `),this.headerCopyIdValue),this.hiddenSelector.matches("header:copy-json",!0)?"":t(k||(k=K` <foxy-copy-to-clipboard infer="header copy-json" class="text-m" icon="icons:code" text="${0}"> </foxy-copy-to-clipboard> `),JSON.stringify(e,null,2))):"",e?t(S||(S=K` <div class="flex flex-wrap items-center gap-s leading-xs"> ${0} <foxy-i18n infer="header" class="text-secondary" key="${0}" .options="${0}"> </foxy-i18n> </div> ${0} `),this.headerSubtitleBadges.map((e=>{var r;return t(_||(_=K` <span data-testclass="badge" class="${0}"> ${0} ${0} </span> `),d({"inline-flex gap-xs items-center rounded-s px-xs":!0,[null!==(r=e.class)&&void 0!==r?r:"bg-contrast-5"]:!0}),e.icon,"text"in e?e.text:t(j||(j=K`<foxy-i18n infer="header badges" key="${0}"></foxy-i18n>`),e.key))})),this.headerSubtitleKey,this.headerSubtitleOptions,r?t(E||(E=K`<div class="flex gap-x-m">${0}</div>`),r):""):"",this.renderTemplateOrSlot("header:after"))}renderBody(){return t(O||(O=K` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> <div class="w-full"></div> <foxy-internal-undo-control infer="undo"> </foxy-internal-undo-control> <foxy-internal-submit-control infer="submit"> </foxy-internal-submit-control> <foxy-internal-submit-control infer="create" theme="primary success"> </foxy-internal-submit-control> </div> `),["delete","undo","submit","create"].every((e=>this.hiddenSelector.matches(e,!0))))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return t(T||(T=K` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> ${0} </div> </div> `),this.in("busy"),d({"space-y-m":!0,"transition-all filter":!0,"opacity-30 blur-sm pointer-events-none":e}),this.__generalErrors.map((e=>this.__renderGeneralError(e))),this.status?this.__renderStatus(this.status):"",this.renderBody(),d({"flex flex-col items-center justify-center gap-m":!0,"transition-opacity absolute inset-0":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy",this.href&&this.in("fail")?t(C||(C=K` <vaadin-button theme="small contrast" @click="${0}"> <foxy-i18n infer="spinner" key="refresh"></foxy-i18n> </vaadin-button> `),(()=>this.refresh())):"")}get __generalErrors(){const e=this.constructor.generalErrorPrefix;return this.errors.filter((t=>t.startsWith(e)))}__renderGeneralError(e){return t(w||(w=K` <foxy-i18n class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" infer="error" key="${0}"> </foxy-i18n> `),e.replace("error:",""))}__renderStatus({key:e,options:r}){if(!this.hiddenSelector.matches("status",!0))return t(B||(B=K` <p data-testid="status" class="leading-xs text-body rounded bg-success-10 flex items-start gap-m" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n class="flex-1" infer="status" key="${0}" .options="${0}"></foxy-i18n> <vaadin-button class="flex-shrink-0" theme="success tertiary-inline" @click="${0}"> <foxy-i18n class="flex-1" infer="status" key="close"></foxy-i18n> </vaadin-button> </p> `),e,r,(()=>this.status=null))}}I.generalErrorPrefix="error:",customElements.define("foxy-internal-form",I);export{I};
@@ -1,2 +1,2 @@
1
- import{I as e}from"./shared-9a454e09.js";import{_ as r}from"./shared-8f9014ff.js";import{c as t,h as s}from"./shared-ba5c42c7.js";import{r as a}from"./shared-5fd5805c.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return r(r({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,t(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let r,t,o;return this.disabled?(r="bg-contrast-5 text-disabled",o="text-disabled",this.readonly?(r+=" border-dashed border-contrast-20",t="border-dashed border-contrast-30"):(r+=" border-transparent",t="border-contrast-10")):this.readonly?(r="border-dashed border-contrast-30 bg-transparent text-secondary",t="border-dashed border-contrast-30",o="text-secondary",this.__focused&&(t+=" ring-2 ring-primary-50")):this.__focused?(r="border-transparent bg-contrast-10 text-tertiary",t="border-primary-50 ring-1 ring-primary-50",o="text-body"):this.__hovered?(r="border-transparent bg-contrast-20 text-tertiary",t="border-contrast-20",o="text-body"):(r="border-transparent bg-contrast-10 text-tertiary",t="border-contrast-10",o="text-body"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-s leading-s" ?hidden="${0}"> <div class="transition-colors text-l font-medium" part="label">${0}</div> <div class="transition-colors text-s text-secondary" part="helper-text"> ${0} </div> </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
1
+ import{I as e}from"./shared-650b8749.js";import{_ as r}from"./shared-8f9014ff.js";import{c as t,h as s}from"./shared-ba5c42c7.js";import{r as a}from"./shared-5fd5805c.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return r(r({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,t(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let r,t,o;return this.disabled?(r="bg-contrast-5 text-disabled",o="text-disabled",this.readonly?(r+=" border-dashed border-contrast-20",t="border-dashed border-contrast-30"):(r+=" border-transparent",t="border-contrast-10")):this.readonly?(r="border-dashed border-contrast-30 bg-transparent text-secondary",t="border-dashed border-contrast-30",o="text-secondary",this.__focused&&(t+=" ring-2 ring-primary-50")):this.__focused?(r="border-transparent bg-contrast-10 text-tertiary",t="border-primary-50 ring-1 ring-primary-50",o="text-body"):this.__hovered?(r="border-transparent bg-contrast-20 text-tertiary",t="border-contrast-20",o="text-body"):(r="border-transparent bg-contrast-10 text-tertiary",t="border-contrast-10",o="text-body"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-s leading-s" ?hidden="${0}"> <div class="transition-colors text-l font-medium" part="label">${0}</div> <div class="transition-colors text-s text-secondary" part="helper-text"> ${0} </div> </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
2
2
  </textarea> </div> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> </label> `),(()=>this.__hovered=!0),(()=>this.__hovered=!1),!this.label&&!this.helperText,this.label,this.helperText,t,r,a(null!==(e=this._value.split("\n"))&&void 0!==e?e:[],((e,r)=>String(r)),((e,r)=>s(d||(d=c`<div>${0}${0}<span>${0}<span></span></span></div>`),r<9?s(l||(l=c`<span class="opacity-0">0</span>`)):"",r<99?s(n||(n=c`<span class="opacity-0">0</span>`)):"",r+1))),this.placeholder,o,this._value,this.disabled,this.readonly,(()=>this.__focused=!0),(()=>{this.__focused=!1,this.__isErrorVisible=!0}),(e=>{const r=e.currentTarget;this._value=r.value}),!this.__isErrorVisible||!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}updated(e){super.updated(e),this.renderRoot.querySelectorAll("textarea").forEach((e=>{e.style.height="auto",e.style.height=`${e.scrollHeight}px`,e.style.overflowY="hidden"}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});