@foxy.io/elements 1.41.0-beta.3 → 1.41.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +5 -5
  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-api-browser.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-form.js +1 -1
  12. package/dist/cdn/foxy-billing-address-card.js +1 -1
  13. package/dist/cdn/foxy-cancellation-form.js +1 -1
  14. package/dist/cdn/foxy-cart-card.js +1 -1
  15. package/dist/cdn/foxy-cart-form.js +2 -2
  16. package/dist/cdn/foxy-client-card.js +1 -1
  17. package/dist/cdn/foxy-client-form.js +1 -1
  18. package/dist/cdn/foxy-collection-page.js +1 -1
  19. package/dist/cdn/foxy-collection-pages.js +1 -1
  20. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  21. package/dist/cdn/foxy-coupon-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  24. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  26. package/dist/cdn/foxy-coupon-form.js +1 -1
  27. package/dist/cdn/foxy-custom-field-card.js +1 -1
  28. package/dist/cdn/foxy-custom-field-form.js +1 -1
  29. package/dist/cdn/foxy-customer-card.js +1 -1
  30. package/dist/cdn/foxy-customer-form.js +1 -1
  31. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  33. package/dist/cdn/foxy-customer-portal.js +1 -1
  34. package/dist/cdn/foxy-customer.js +1 -1
  35. package/dist/cdn/foxy-customers-table.js +1 -1
  36. package/dist/cdn/foxy-discount-builder.js +1 -1
  37. package/dist/cdn/foxy-discount-card.js +1 -1
  38. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  39. package/dist/cdn/foxy-donation.js +1 -1
  40. package/dist/cdn/foxy-downloadable-card.js +1 -1
  41. package/dist/cdn/foxy-downloadable-form.js +1 -1
  42. package/dist/cdn/foxy-email-template-card.js +1 -1
  43. package/dist/cdn/foxy-email-template-form.js +1 -1
  44. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  45. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  46. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  47. package/dist/cdn/foxy-form-dialog.js +1 -1
  48. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  49. package/dist/cdn/foxy-gift-card-card.js +1 -1
  50. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  51. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  54. package/dist/cdn/foxy-gift-card-form.js +1 -1
  55. package/dist/cdn/foxy-i18n-editor.js +1 -1
  56. package/dist/cdn/foxy-i18n.js +1 -1
  57. package/dist/cdn/foxy-integration-card.js +1 -1
  58. package/dist/cdn/foxy-integration-form.js +1 -1
  59. package/dist/cdn/foxy-item-card.js +1 -1
  60. package/dist/cdn/foxy-item-category-card.js +1 -1
  61. package/dist/cdn/foxy-item-category-form.js +1 -1
  62. package/dist/cdn/foxy-item-form.js +1 -1
  63. package/dist/cdn/foxy-item-option-card.js +1 -1
  64. package/dist/cdn/foxy-item-option-form.js +1 -1
  65. package/dist/cdn/foxy-items-form.js +1 -1
  66. package/dist/cdn/foxy-native-integration-card.js +1 -1
  67. package/dist/cdn/foxy-native-integration-form.js +1 -1
  68. package/dist/cdn/foxy-pagination.js +1 -1
  69. package/dist/cdn/foxy-passkey-card.js +1 -1
  70. package/dist/cdn/foxy-passkey-form.js +1 -1
  71. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  72. package/dist/cdn/foxy-payment-card.js +1 -1
  73. package/dist/cdn/foxy-payment-method-card.js +1 -1
  74. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  75. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  76. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  80. package/dist/cdn/foxy-report-form.js +1 -1
  81. package/dist/cdn/foxy-reports-table.js +1 -1
  82. package/dist/cdn/foxy-shipment-card.js +1 -1
  83. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  84. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  85. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  86. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  87. package/dist/cdn/foxy-sign-in-form.js +1 -1
  88. package/dist/cdn/foxy-spinner.js +1 -1
  89. package/dist/cdn/foxy-store-card.js +1 -1
  90. package/dist/cdn/foxy-store-form.js +1 -1
  91. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  92. package/dist/cdn/foxy-subscription-card.js +1 -1
  93. package/dist/cdn/foxy-subscription-form.js +1 -1
  94. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  95. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  96. package/dist/cdn/foxy-table.js +1 -1
  97. package/dist/cdn/foxy-tax-card.js +1 -1
  98. package/dist/cdn/foxy-tax-form.js +1 -1
  99. package/dist/cdn/foxy-template-config-form.js +1 -1
  100. package/dist/cdn/foxy-template-form.js +1 -1
  101. package/dist/cdn/foxy-template-set-card.js +1 -1
  102. package/dist/cdn/foxy-template-set-form.js +1 -1
  103. package/dist/cdn/foxy-transaction-card.js +1 -1
  104. package/dist/cdn/foxy-transaction.js +1 -1
  105. package/dist/cdn/foxy-transactions-table.js +7 -7
  106. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  107. package/dist/cdn/foxy-user-card.js +1 -1
  108. package/dist/cdn/foxy-user-form.js +1 -1
  109. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  110. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  111. package/dist/cdn/foxy-users-table.js +1 -1
  112. package/dist/cdn/foxy-webhook-card.js +1 -1
  113. package/dist/cdn/foxy-webhook-form.js +1 -1
  114. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  115. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  116. package/dist/cdn/{shared-8a380d5b.js → shared-0ae48c81.js} +1 -1
  117. package/dist/cdn/{shared-968df92b.js → shared-14209e60.js} +1 -1
  118. package/dist/cdn/{shared-c5025eca.js → shared-174ae849.js} +1 -1
  119. package/dist/cdn/{shared-15f46bcc.js → shared-1d2c7978.js} +1 -1
  120. package/dist/cdn/{shared-75f0b4ce.js → shared-1f659198.js} +1 -1
  121. package/dist/cdn/{shared-7f25f727.js → shared-2a941373.js} +1 -1
  122. package/dist/cdn/{shared-72536261.js → shared-375c365e.js} +1 -1
  123. package/dist/cdn/{shared-32f04dd0.js → shared-379b6e13.js} +1 -1
  124. package/dist/cdn/{shared-678878ae.js → shared-3c7e55e4.js} +1 -1
  125. package/dist/cdn/{shared-86d308bf.js → shared-44209364.js} +1 -1
  126. package/dist/cdn/{shared-ee4757df.js → shared-499c03b8.js} +1 -1
  127. package/dist/cdn/{shared-ec013722.js → shared-58bb3dda.js} +1 -1
  128. package/dist/cdn/{shared-72ebbdcd.js → shared-5c6a00e9.js} +1 -1
  129. package/dist/cdn/{shared-df97fdc7.js → shared-6ce9d926.js} +1 -1
  130. package/dist/cdn/{shared-4507220f.js → shared-70bcd6ae.js} +1 -1
  131. package/dist/cdn/{shared-f2f81cda.js → shared-7eefc244.js} +1 -1
  132. package/dist/cdn/{shared-90a27f17.js → shared-7f14ea13.js} +1 -1
  133. package/dist/cdn/{shared-be50c355.js → shared-922db328.js} +1 -1
  134. package/dist/cdn/{shared-a510a176.js → shared-a0570012.js} +1 -1
  135. package/dist/cdn/{shared-59657e70.js → shared-b82e43e5.js} +1 -1
  136. package/dist/cdn/{shared-313956af.js → shared-cdaf66d3.js} +1 -1
  137. package/dist/cdn/{shared-ffa49371.js → shared-dc383217.js} +1 -1
  138. package/dist/cdn/{shared-49fef994.js → shared-ed3fc85e.js} +1 -1
  139. package/dist/cdn/{shared-92f7ee94.js → shared-f00ebf92.js} +1 -1
  140. package/dist/cdn/{shared-2be606c3.js → shared-f7db49fe.js} +1 -1
  141. package/dist/cdn/translations/admin-subscription-form/en.json +59 -59
  142. package/dist/cdn/translations/experimental-add-to-cart-builder/en.json +5 -2
  143. package/dist/cdn/translations/template-config-form/en.json +1 -1
  144. package/dist/cdn/translations/transaction/en.json +36 -56
  145. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControl.d.ts +0 -4
  146. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControl.js +12 -63
  147. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControl.js.map +1 -1
  148. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControlDialog.d.ts +16 -0
  149. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControlDialog.js +95 -0
  150. package/dist/elements/internal/InternalPostActionControl/InternalPostActionControlDialog.js.map +1 -0
  151. package/dist/elements/internal/InternalPostActionControl/index.d.ts +1 -2
  152. package/dist/elements/internal/InternalPostActionControl/index.js +3 -2
  153. package/dist/elements/internal/InternalPostActionControl/index.js.map +1 -1
  154. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js +35 -11
  155. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js.map +1 -1
  156. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderItemControl/InternalExperimentalAddToCartBuilderItemControl.d.ts +1 -0
  157. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderItemControl/InternalExperimentalAddToCartBuilderItemControl.js +3 -0
  158. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderItemControl/InternalExperimentalAddToCartBuilderItemControl.js.map +1 -1
  159. package/dist/elements/public/I18n/format/date.js +1 -1
  160. package/dist/elements/public/I18n/format/date.js.map +1 -1
  161. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +1 -0
  162. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +10 -2
  163. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -1
  164. package/package.json +1 -1
  165. /package/dist/cdn/{shared-35dbfac1.js → shared-14177287.js} +0 -0
@@ -1 +1 @@
1
- import"./shared-2fe84d72.js";import"./shared-90a27f17.js";import{I as e,a as t}from"./shared-92f7ee94.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-form-dialog.js";import"./shared-72ebbdcd.js";import{_ as s,m as i}from"./shared-cb58dfcd.js";import{h as r,s as o}from"./shared-ba5c42c7.js";import{s as l}from"./shared-53e476fd.js";import{g as a}from"./shared-bab2ea2c.js";import{F as n}from"./shared-343d1fd7.js";import{i as d}from"./shared-53e42a77.js";import{c as h}from"./shared-4e709717.js";import{u}from"./shared-f83207fb.js";let c,f=e=>e;let p,y,m,v,x,b,g,$,_=e=>e;customElements.define("foxy-internal-resource-picker-control-form",class extends e{constructor(){super(...arguments),this.selectionProps={}}static get properties(){return s(s({},super.properties),{},{selectionProps:{attribute:!1}})}renderBody(){return r(c||(c=f` <foxy-internal-async-list-control infer="selection" form="foxy-null" hide-delete-button hide-create-button @itemclick="${0}" ...="${0}"> </foxy-internal-async-list-control> `),(e=>{e.preventDefault(),this.edit({selection:e.detail}),this.submit()}),l(this.selectionProps))}}),customElements.define("foxy-internal-resource-picker-control",class extends t{constructor(){super(...arguments),this.getDisplayValueOptions=e=>({resource:e}),this.showCopyIdButton=!1,this.virtualHost=u("internal-resource-picker-control-"),this.getItemUrl=null,this.formProps={},this.filters=[],this.layout=null,this.first=null,this.item=null,this.form=null,this.__getItemRenderer=i((e=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer="card"\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)))}static get properties(){return s(s({},super.properties),{},{getDisplayValueOptions:{attribute:!1},showCopyIdButton:{type:Boolean,attribute:"show-copy-id-button"},virtualHost:{},getItemUrl:{attribute:!1},formProps:{type:Object},filters:{type:Array},layout:{},first:{},item:{},form:{}})}renderControl(){var e;const t=s(s({},this.formProps),{},{".selectionProps":{".filters":this.filters,".first":this.first,".item":this.item}});return r(p||(p=_` <foxy-form-dialog parent="foxy://${0}/select" header="header" infer="dialog" alert .props="${0}" .form="${0}" @fetch="${0}"> </foxy-form-dialog> ${0} `),this.virtualHost,t,null!==(e=this.form)&&void 0!==e?e:"foxy-internal-resource-picker-control-form",this.__handleFetchEvent,"summary-item"===this.layout?this.__renderSummaryItemLayout():this.__renderStandaloneLayout())}updated(e){var t,s;super.updated(e),e.has("item")&&(null===(s=(t=this.__getItemRenderer.cache).clear)||void 0===s||s.call(t))}__clear(){this._value="",this.dispatchEvent(new CustomEvent("clear"))}__renderSummaryItemLayout(){const e=this.renderRoot.querySelector("#value");return r(y||(y=_` <div class="leading-xs"> <div class="flex items-center gap-xs"> <div class="text-m text-body whitespace-nowrap flex-1">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div class="truncate min-w-0"> ${0} </div> </button> <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> <div style="max-width:32rem"> <div class="text-xs text-secondary">${0}</div> <div class="text-xs text-error" ?hidden="${0}"> ${0} </div> </div> </div> <foxy-nucleon infer="" href="${0}" id="value" @update="${0}"> </foxy-nucleon> `),this.label,this.t("select"),h({"text-right min-w-0 transition-colors transition-opacity":!0,"rounded-s focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"cursor-pointer text-body hover-opacity-80":!this.disabled&&!this.readonly,"font-medium":!this.readonly}),this.disabled||this.readonly,(e=>{if(this.disabled||this.readonly)return;const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),this._value?r(m||(m=_` <foxy-i18n infer="" key="value" .options="${0}"> </foxy-i18n> `),(null==e?void 0:e.data)?this.getDisplayValueOptions(e.data):{context:(null==e?void 0:e.in("fail"))?"fail":"busy"}):this.placeholder,this.t("clear"),h({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,this.__clear,o(v||(v=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)),this.helperText,this.disabled||this.readonly,this._errorMessage,d(this._value||void 0),(()=>this.requestUpdate()))}__renderStandaloneLayout(){var e,t,s,i,o;const n=this.__valueLoader,u="string"==typeof this._value?a(this._value):void 0,c="string"==typeof this._value?null===(e=this.getItemUrl)||void 0===e?void 0:e.call(this,this._value,null!==(t=null==n?void 0:n.data)&&void 0!==t?t:null):void 0;return r(x||(x=_` <div class="block group"> <div class="${0}"> <span class="mr-auto text-l">${0}</span> ${0} ${0} ${0} </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> <button class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?disabled="${0}" @click="${0}"> <div class="${0}"> <foxy-nucleon class="block" infer="" href="${0}" id="valueLoader" @update="${0}"> ${0} </foxy-nucleon> </div> </button> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </div> `),h({"flex items-center gap-s transition-colors font-medium":!0,"text-disabled":this.disabled}),this.label,c?r(b||(b=_` <a class="text-body rounded transition-opacity hover-opacity-90 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="view"></foxy-i18n> </a> `),c):"",this.showCopyIdButton&&null!==u?r(g||(g=_` <foxy-copy-to-clipboard layout="text" theme="contrast tertiary-inline" infer="copy-id" text="${0}"> </foxy-copy-to-clipboard> `),u):"",this.readonly||!this._value?"":r($||($=_` <vaadin-button theme="error tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="clear"></foxy-i18n> </vaadin-button> `),this.disabled,this.__clear),!this.helperText,this.helperText,h({"block w-full bg-contrast-5 rounded text-left transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer hover-bg-contrast-10":!this.disabled&&!this.readonly,"cursor-default":this.disabled||this.readonly,"mt-s":!!this.label||!!this.helperText}),this.disabled||this.readonly,(e=>{const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),h({"transition-opacity":!0,"opacity-50":this.disabled}),d(this._value||void 0),(()=>this.requestUpdate()),this.__getItemRenderer(this.item)({html:r,data:null!==(s=null==n?void 0:n.data)&&void 0!==s?s:null,href:this._value||"",related:[],parent:"",props:{},spread:l,simplifyNsLoading:this.simplifyNsLoading,disabled:this.disabled,disabledControls:this.disabledControls,readonly:this.readonly,readonlyControls:this.readonlyControls,hidden:this.hidden,hiddenControls:this.hiddenControls,templates:this.templates,previous:null,next:null,group:null!==(o=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==o?o:"",lang:this.lang,ns:this.ns}),!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}__handleFetchEvent(e){if(!(e instanceof n))return;if(e.defaultPrevented)return;const{url:t,method:s}=e.request;return t===`foxy://${this.virtualHost}/select`&&"POST"===s?e.respondWith(this.__handleSelect(e.request)):t===`foxy://${this.virtualHost}/empty`&&"GET"===s?e.respondWith(this.__handleEmpty()):void 0}async __handleSelect(e){const t=await e.clone().json();return this._value=t.selection,new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}async __handleEmpty(){return new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}get __valueLoader(){return this.renderRoot.querySelector("#valueLoader")}});
1
+ import"./shared-2fe84d72.js";import"./shared-7f14ea13.js";import{I as e,a as t}from"./shared-f00ebf92.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-form-dialog.js";import"./shared-5c6a00e9.js";import{_ as s,m as i}from"./shared-cb58dfcd.js";import{h as r,s as o}from"./shared-ba5c42c7.js";import{s as l}from"./shared-53e476fd.js";import{g as a}from"./shared-bab2ea2c.js";import{F as n}from"./shared-343d1fd7.js";import{i as d}from"./shared-53e42a77.js";import{c as h}from"./shared-4e709717.js";import{u}from"./shared-f83207fb.js";let c,f=e=>e;let p,y,m,v,x,b,g,$,_=e=>e;customElements.define("foxy-internal-resource-picker-control-form",class extends e{constructor(){super(...arguments),this.selectionProps={}}static get properties(){return s(s({},super.properties),{},{selectionProps:{attribute:!1}})}renderBody(){return r(c||(c=f` <foxy-internal-async-list-control infer="selection" form="foxy-null" hide-delete-button hide-create-button @itemclick="${0}" ...="${0}"> </foxy-internal-async-list-control> `),(e=>{e.preventDefault(),this.edit({selection:e.detail}),this.submit()}),l(this.selectionProps))}}),customElements.define("foxy-internal-resource-picker-control",class extends t{constructor(){super(...arguments),this.getDisplayValueOptions=e=>({resource:e}),this.showCopyIdButton=!1,this.virtualHost=u("internal-resource-picker-control-"),this.getItemUrl=null,this.formProps={},this.filters=[],this.layout=null,this.first=null,this.item=null,this.form=null,this.__getItemRenderer=i((e=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer="card"\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)))}static get properties(){return s(s({},super.properties),{},{getDisplayValueOptions:{attribute:!1},showCopyIdButton:{type:Boolean,attribute:"show-copy-id-button"},virtualHost:{},getItemUrl:{attribute:!1},formProps:{type:Object},filters:{type:Array},layout:{},first:{},item:{},form:{}})}renderControl(){var e;const t=s(s({},this.formProps),{},{".selectionProps":{".filters":this.filters,".first":this.first,".item":this.item}});return r(p||(p=_` <foxy-form-dialog parent="foxy://${0}/select" header="header" infer="dialog" alert .props="${0}" .form="${0}" @fetch="${0}"> </foxy-form-dialog> ${0} `),this.virtualHost,t,null!==(e=this.form)&&void 0!==e?e:"foxy-internal-resource-picker-control-form",this.__handleFetchEvent,"summary-item"===this.layout?this.__renderSummaryItemLayout():this.__renderStandaloneLayout())}updated(e){var t,s;super.updated(e),e.has("item")&&(null===(s=(t=this.__getItemRenderer.cache).clear)||void 0===s||s.call(t))}__clear(){this._value="",this.dispatchEvent(new CustomEvent("clear"))}__renderSummaryItemLayout(){const e=this.renderRoot.querySelector("#value");return r(y||(y=_` <div class="leading-xs"> <div class="flex items-center gap-xs"> <div class="text-m text-body whitespace-nowrap flex-1">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div class="truncate min-w-0"> ${0} </div> </button> <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> <div style="max-width:32rem"> <div class="text-xs text-secondary">${0}</div> <div class="text-xs text-error" ?hidden="${0}"> ${0} </div> </div> </div> <foxy-nucleon infer="" href="${0}" id="value" @update="${0}"> </foxy-nucleon> `),this.label,this.t("select"),h({"text-right min-w-0 transition-colors transition-opacity":!0,"rounded-s focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"cursor-pointer text-body hover-opacity-80":!this.disabled&&!this.readonly,"font-medium":!this.readonly}),this.disabled||this.readonly,(e=>{if(this.disabled||this.readonly)return;const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),this._value?r(m||(m=_` <foxy-i18n infer="" key="value" .options="${0}"> </foxy-i18n> `),(null==e?void 0:e.data)?this.getDisplayValueOptions(e.data):{context:(null==e?void 0:e.in("fail"))?"fail":"busy"}):this.placeholder,this.t("clear"),h({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,this.__clear,o(v||(v=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)),this.helperText,this.disabled||this.readonly,this._errorMessage,d(this._value||void 0),(()=>this.requestUpdate()))}__renderStandaloneLayout(){var e,t,s,i,o;const n=this.__valueLoader,u="string"==typeof this._value?a(this._value):void 0,c="string"==typeof this._value?null===(e=this.getItemUrl)||void 0===e?void 0:e.call(this,this._value,null!==(t=null==n?void 0:n.data)&&void 0!==t?t:null):void 0;return r(x||(x=_` <div class="block group"> <div class="${0}"> <span class="mr-auto text-l">${0}</span> ${0} ${0} ${0} </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> <button class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?disabled="${0}" @click="${0}"> <div class="${0}"> <foxy-nucleon class="block" infer="" href="${0}" id="valueLoader" @update="${0}"> ${0} </foxy-nucleon> </div> </button> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </div> `),h({"flex items-center gap-s transition-colors font-medium":!0,"text-disabled":this.disabled}),this.label,c?r(b||(b=_` <a class="text-body rounded transition-opacity hover-opacity-90 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="view"></foxy-i18n> </a> `),c):"",this.showCopyIdButton&&null!==u?r(g||(g=_` <foxy-copy-to-clipboard layout="text" theme="contrast tertiary-inline" infer="copy-id" text="${0}"> </foxy-copy-to-clipboard> `),u):"",this.readonly||!this._value?"":r($||($=_` <vaadin-button theme="error tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="clear"></foxy-i18n> </vaadin-button> `),this.disabled,this.__clear),!this.helperText,this.helperText,h({"block w-full bg-contrast-5 rounded text-left transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer hover-bg-contrast-10":!this.disabled&&!this.readonly,"cursor-default":this.disabled||this.readonly,"mt-s":!!this.label||!!this.helperText}),this.disabled||this.readonly,(e=>{const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),h({"transition-opacity":!0,"opacity-50":this.disabled}),d(this._value||void 0),(()=>this.requestUpdate()),this.__getItemRenderer(this.item)({html:r,data:null!==(s=null==n?void 0:n.data)&&void 0!==s?s:null,href:this._value||"",related:[],parent:"",props:{},spread:l,simplifyNsLoading:this.simplifyNsLoading,disabled:this.disabled,disabledControls:this.disabledControls,readonly:this.readonly,readonlyControls:this.readonlyControls,hidden:this.hidden,hiddenControls:this.hiddenControls,templates:this.templates,previous:null,next:null,group:null!==(o=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==o?o:"",lang:this.lang,ns:this.ns}),!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}__handleFetchEvent(e){if(!(e instanceof n))return;if(e.defaultPrevented)return;const{url:t,method:s}=e.request;return t===`foxy://${this.virtualHost}/select`&&"POST"===s?e.respondWith(this.__handleSelect(e.request)):t===`foxy://${this.virtualHost}/empty`&&"GET"===s?e.respondWith(this.__handleEmpty()):void 0}async __handleSelect(e){const t=await e.clone().json();return this._value=t.selection,new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}async __handleEmpty(){return new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}get __valueLoader(){return this.renderRoot.querySelector("#valueLoader")}});
@@ -1 +1 @@
1
- import{A as e,_ as t}from"./shared-cb58dfcd.js";import{h as n,L as r}from"./shared-ba5c42c7.js";import{i as s,a as i}from"./shared-3c0dcb9e.js";import{F as a}from"./shared-343d1fd7.js";import{I as o}from"./shared-2aa23b5f.js";const l={type:"backend",init:()=>{},read:(t,n,r)=>{const s=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},i=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},o=new a("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new e.WHATWGRequest(`foxy://i18n/${n}/${t}`),resolve:s,reject:i});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(s).catch(i)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const i=t.endsWith("_percentage")?.01:1,a=n.split("|"),o=["allunits","incremental","repeat","single"].includes(a[0])?a.shift():"single",l=e.split(" "),c=l.shift(),u=[...l,`${o}_${t}_discount_summary`].join(".");return a.map((e=>{var t,n;const r=null!==(n=null===(t=/[-+]/.exec(e))||void 0===t?void 0:t.index)&&void 0!==n?n:-1,s=parseFloat(e.substring(r))*i,a=parseFloat(e.substring(0,r));return`$t(${u}, ${JSON.stringify({maximumFractionDigits:10,adjustment:s,from:a,ns:c})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:i}=c(e,!0);return.5===s&&"month"===i&&(s=2,i="week"),r.format(s,i)},percent:(e,n,r,s)=>{let i=null;try{"number"==typeof e&&(i=e.toLocaleString(r,t(t({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return i||String(e)},ordinal:(e,t,n,r)=>{var s,i;const a=new Intl.PluralRules(n,{type:"ordinal"}),o=null!==(i=null===(s=null==r?void 0:r.ns)||void 0===s?void 0:s.split(" "))&&void 0!==i?i:[];null==o||o.shift();return`${e}$t(${[...o,`ordinal_${a.select(e)}`].join(".")})`},price:(e,t,n,r)=>{var s;try{const[t,i]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:i})}catch(t){return e}},date:(e,t,n,r)=>{var s,i,a;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=(null!==(i=null==r?void 0:r.year)&&void 0!==i?i:(new Date).getFullYear()===o.getFullYear())?void 0:"numeric",u=null!==(a=null==r?void 0:r.day)&&void 0!==a?a:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(i(o(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof a&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=a,m.i18next=s.createInstance().use(l),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,i;return null!==(i=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==i?i:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,c as p};
1
+ import{A as e,_ as t}from"./shared-cb58dfcd.js";import{h as n,L as r}from"./shared-ba5c42c7.js";import{i as s,a as i}from"./shared-3c0dcb9e.js";import{F as a}from"./shared-343d1fd7.js";import{I as o}from"./shared-2aa23b5f.js";const l={type:"backend",init:()=>{},read:(t,n,r)=>{const s=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},i=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},o=new a("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new e.WHATWGRequest(`foxy://i18n/${n}/${t}`),resolve:s,reject:i});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(s).catch(i)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const i=t.endsWith("_percentage")?.01:1,a=n.split("|"),o=["allunits","incremental","repeat","single"].includes(a[0])?a.shift():"single",l=e.split(" "),c=l.shift(),u=[...l,`${o}_${t}_discount_summary`].join(".");return a.map((e=>{var t,n;const r=null!==(n=null===(t=/[-+]/.exec(e))||void 0===t?void 0:t.index)&&void 0!==n?n:-1,s=parseFloat(e.substring(r))*i,a=parseFloat(e.substring(0,r));return`$t(${u}, ${JSON.stringify({maximumFractionDigits:10,adjustment:s,from:a,ns:c})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:i}=c(e,!0);return.5===s&&"month"===i&&(s=2,i="week"),r.format(s,i)},percent:(e,n,r,s)=>{let i=null;try{"number"==typeof e&&(i=e.toLocaleString(r,t(t({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return i||String(e)},ordinal:(e,t,n,r)=>{var s,i;const a=new Intl.PluralRules(n,{type:"ordinal"}),o=null!==(i=null===(s=null==r?void 0:r.ns)||void 0===s?void 0:s.split(" "))&&void 0!==i?i:[];null==o||o.shift();return`${e}$t(${[...o,`ordinal_${a.select(e)}`].join(".")})`},price:(e,t,n,r)=>{var s;try{const[t,i]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:i})}catch(t){return e}},date:(e,t,n,r)=>{var s,i,a;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=null!==(i=null==r?void 0:r.year)&&void 0!==i?i:"numeric",u=null!==(a=null==r?void 0:r.day)&&void 0!==a?a:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(i(o(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof a&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=a,m.i18next=s.createInstance().use(l),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,i;return null!==(i=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==i?i:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,c as p};
@@ -1 +1 @@
1
- import"./shared-29b0ef56.js";import{a as e}from"./shared-92f7ee94.js";import"./shared-72ebbdcd.js";import{_ as t}from"./shared-cb58dfcd.js";import{h as s,s as i}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,a,o,h,c,n,d=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.helperTextAsToolip=!1,this.falseAlias=null,this.trueAlias=null,this.invert=!1}static get properties(){return t(t({},super.properties),{},{helperTextAsToolip:{type:Boolean,attribute:"helper-text-as-tooltip"},falseAlias:{attribute:"false-alias"},trueAlias:{attribute:"true-alias"},invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return s(r||(r=d` <div class="flex items-start gap-s leading-xs text-m"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> ${0} <p class="text-xs text-error" style="max-width:32rem" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(a||(a=d`<p class="text-xs text-secondary" style="max-width:32rem"> ${0} </p>`),this.helperText),this.disabled||this.readonly,this._errorMessage,this.readonly?s(o||(o=d`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):s(h||(h=d` <div style="height:calc(1em * var(--lumo-line-height-xs))" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((1em * var(--lumo-line-height-xs)) - 3px + var(--lumo-space-m))" class="${0}" @click="${0}"> <div style="margin:1.5px;width:calc((1em * var(--lumo-line-height-xs)) - 6px);height:calc((1em * var(--lumo-line-height-xs)) - 6px)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),l({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),l({"transition-all transform block rounded-full":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})),this.helperTextAsToolip&&this.helperText?s(c||(c=d` <div class="transition-colors text-tertiary flex-shrink-0 cursor-pointer hover-text-body" id="trigger"> ${0} </div> <vcf-tooltip for="trigger" style="--lumo-base-color:black;max-width:30rem" class="mt-s" theme="light" position="bottom"> <span class="text-s" style="color:#fff">${0}</span> </vcf-tooltip> `),i(n||(n=d`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: calc(1em * var(--lumo-line-height-xs)); height: calc(1em * var(--lumo-line-height-xs)); margin-right: -0.12em"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),this.helperText):"")}get _value(){const e=super._value;return!(!this.trueAlias||e!==this.trueAlias)||(!this.falseAlias||e!==this.falseAlias)&&!!e}set _value(e){this.trueAlias&&!0===e?super._value=this.trueAlias:this.falseAlias&&!1===e?super._value=this.falseAlias:super._value=e}});
1
+ import"./shared-29b0ef56.js";import{a as e}from"./shared-f00ebf92.js";import"./shared-5c6a00e9.js";import{_ as t}from"./shared-cb58dfcd.js";import{h as s,s as i}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,a,o,h,c,n,d=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.helperTextAsToolip=!1,this.falseAlias=null,this.trueAlias=null,this.invert=!1}static get properties(){return t(t({},super.properties),{},{helperTextAsToolip:{type:Boolean,attribute:"helper-text-as-tooltip"},falseAlias:{attribute:"false-alias"},trueAlias:{attribute:"true-alias"},invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return s(r||(r=d` <div class="flex items-start gap-s leading-xs text-m"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> ${0} <p class="text-xs text-error" style="max-width:32rem" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(a||(a=d`<p class="text-xs text-secondary" style="max-width:32rem"> ${0} </p>`),this.helperText),this.disabled||this.readonly,this._errorMessage,this.readonly?s(o||(o=d`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):s(h||(h=d` <div style="height:calc(1em * var(--lumo-line-height-xs))" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((1em * var(--lumo-line-height-xs)) - 3px + var(--lumo-space-m))" class="${0}" @click="${0}"> <div style="margin:1.5px;width:calc((1em * var(--lumo-line-height-xs)) - 6px);height:calc((1em * var(--lumo-line-height-xs)) - 6px)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),l({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),l({"transition-all transform block rounded-full":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})),this.helperTextAsToolip&&this.helperText?s(c||(c=d` <div class="transition-colors text-tertiary flex-shrink-0 cursor-pointer hover-text-body" id="trigger"> ${0} </div> <vcf-tooltip for="trigger" style="--lumo-base-color:black;max-width:30rem" class="mt-s" theme="light" position="bottom"> <span class="text-s" style="color:#fff">${0}</span> </vcf-tooltip> `),i(n||(n=d`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: calc(1em * var(--lumo-line-height-xs)); height: calc(1em * var(--lumo-line-height-xs)); margin-right: -0.12em"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),this.helperText):"")}get _value(){const e=super._value;return!(!this.trueAlias||e!==this.trueAlias)||(!this.falseAlias||e!==this.falseAlias)&&!!e}set _value(e){this.trueAlias&&!0===e?super._value=this.trueAlias:this.falseAlias&&!1===e?super._value=this.falseAlias:super._value=e}});
@@ -1,4 +1,4 @@
1
- import{a as e}from"./shared-92f7ee94.js";import"./shared-72ebbdcd.js";import{_ as t}from"./shared-cb58dfcd.js";import{d as s,N as r,i as o,c as a,h as i,s as n}from"./shared-ba5c42c7.js";
1
+ import{a as e}from"./shared-f00ebf92.js";import"./shared-5c6a00e9.js";import{_ as t}from"./shared-cb58dfcd.js";import{d as s,N as r,i as o,c as a,h as i,s as n}from"./shared-ba5c42c7.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import"./shared-2fe84d72.js";import"./shared-72ebbdcd.js";import{_ as t}from"./shared-cb58dfcd.js";import{h as e}from"./shared-ba5c42c7.js";import{D as s}from"./shared-c003fbf3.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.messageOptions={},this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}" .options="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.messageOptions,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
1
+ import"./shared-2fe84d72.js";import"./shared-5c6a00e9.js";import{_ as t}from"./shared-cb58dfcd.js";import{h as e}from"./shared-ba5c42c7.js";import{D as s}from"./shared-c003fbf3.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.messageOptions={},this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}" .options="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.messageOptions,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
@@ -1,4 +1,4 @@
1
- import"./shared-3ad093b5.js";import{h as t,P as e}from"./shared-cfea6000.js";import{F as i,t as o}from"./shared-58c0c5cc.js";import{T as n,a,E as s}from"./shared-65763e6f.js";import"./shared-535d1ec6.js";import{O as r}from"./shared-5231970e.js";import"./shared-2fe84d72.js";import"./shared-4507220f.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-72ebbdcd.js";import{a as l}from"./shared-92f7ee94.js";import"./shared-f2f81cda.js";import{x as d}from"./shared-3c0dcb9e.js";import{c,h,r as u}from"./shared-ba5c42c7.js";import{_ as m}from"./shared-cb58dfcd.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
1
+ import"./shared-3ad093b5.js";import{h as t,P as e}from"./shared-cfea6000.js";import{F as i,t as o}from"./shared-58c0c5cc.js";import{T as n,a,E as s}from"./shared-65763e6f.js";import"./shared-535d1ec6.js";import{O as r}from"./shared-5231970e.js";import"./shared-2fe84d72.js";import"./shared-70bcd6ae.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-5c6a00e9.js";import{a as l}from"./shared-f00ebf92.js";import"./shared-7eefc244.js";import{x as d}from"./shared-3c0dcb9e.js";import{c,h,r as u}from"./shared-ba5c42c7.js";import{_ as m}from"./shared-cb58dfcd.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- import"./shared-c71fb90f.js";import"./shared-acbcad2e.js";import{a as e}from"./shared-92f7ee94.js";import{x as t}from"./shared-3c0dcb9e.js";import{c as r,h as a,s as o}from"./shared-ba5c42c7.js";import{_ as l}from"./shared-cb58dfcd.js";import{i as s}from"./shared-53e42a77.js";import{c as i}from"./shared-4e709717.js";let n;function m(e){var t,r,a;const o=null!==(t=null==e?void 0:e.separator)&&void 0!==t?t:"-",l=null!==(r=null==e?void 0:e.charset)&&void 0!==r?r:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=null!==(a=null==e?void 0:e.length)&&void 0!==a?a:18;let i="";for(let e=0;e<s;e++)o&&e>0&&e%6==0&&(i+=o),i+=l[Math.floor(Math.random()*l.length)];return i}t("vaadin-password-field",r(n||(n=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}`)));let d,h,u,p=e=>e;customElements.define("foxy-internal-password-control",class extends e{constructor(){super(...arguments),this.generatorOptions=null,this.showGenerator=!1,this.layout=null}static get properties(){return l(l({},super.properties),{},{generatorOptions:{type:Object,attribute:"generator-options"},showGenerator:{type:Boolean,attribute:"show-generator"},layout:{}})}renderControl(){var e;return a(d||(d=p` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" theme="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} </vaadin-password-field> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.layout)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.showGenerator?this.__renderGenerator():"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderGenerator(){return a(h||(h=p` <div data-testid="generator" class="${0}" slot="suffix" @click="${0}"> ${0} </div> `),i({"w-s h-s flex items-center justify-center cursor-default transition-colors":!0,"text-contrast-60 hover-text-contrast-80":!this.disabled&&!this.readonly,"text-contrast-20":this.disabled||this.readonly}),(()=>{var e,t,r,a;let o,l=!1,s=0;do{o=m(null!==(e=this.generatorOptions)&&void 0!==e?e:void 0),l=null===(a=null===(r=null===(t=this.generatorOptions)||void 0===t?void 0:t.checkStrength)||void 0===r?void 0:r.call(t,o))||void 0===a||a,s++}while(!l&&s<100);if(!l)throw new Error("Failed to generate a strong password.");this._value=o;const i=this.renderRoot.querySelector("vaadin-password-field");null==i||i._setPasswordVisible(!0)}),o(u||(u=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.15em; height: 1.15em"><path d="M15.98 1.804a1 1 0 00-1.96 0l-.24 1.192a1 1 0 01-.784.785l-1.192.238a1 1 0 000 1.962l1.192.238a1 1 0 01.785.785l.238 1.192a1 1 0 001.962 0l.238-1.192a1 1 0 01.785-.785l1.192-.238a1 1 0 000-1.962l-1.192-.238a1 1 0 01-.785-.785l-.238-1.192zM6.949 5.684a1 1 0 00-1.898 0l-.683 2.051a1 1 0 01-.633.633l-2.051.683a1 1 0 000 1.898l2.051.684a1 1 0 01.633.632l.683 2.051a1 1 0 001.898 0l.683-2.051a1 1 0 01.633-.633l2.051-.683a1 1 0 000-1.898l-2.051-.683a1 1 0 01-.633-.633L6.95 5.684zM13.949 13.684a1 1 0 00-1.898 0l-.184.551a1 1 0 01-.632.633l-.551.183a1 1 0 000 1.898l.551.183a1 1 0 01.633.633l.183.551a1 1 0 001.898 0l.184-.551a1 1 0 01.632-.633l.551-.183a1 1 0 000-1.898l-.551-.184a1 1 0 01-.633-.632l-.183-.551z" /></svg>`)))}});
1
+ import"./shared-c71fb90f.js";import"./shared-acbcad2e.js";import{a as e}from"./shared-f00ebf92.js";import{x as t}from"./shared-3c0dcb9e.js";import{c as r,h as a,s as o}from"./shared-ba5c42c7.js";import{_ as l}from"./shared-cb58dfcd.js";import{i as s}from"./shared-53e42a77.js";import{c as i}from"./shared-4e709717.js";let n;function m(e){var t,r,a;const o=null!==(t=null==e?void 0:e.separator)&&void 0!==t?t:"-",l=null!==(r=null==e?void 0:e.charset)&&void 0!==r?r:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=null!==(a=null==e?void 0:e.length)&&void 0!==a?a:18;let i="";for(let e=0;e<s;e++)o&&e>0&&e%6==0&&(i+=o),i+=l[Math.floor(Math.random()*l.length)];return i}t("vaadin-password-field",r(n||(n=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}`)));let d,h,u,p=e=>e;customElements.define("foxy-internal-password-control",class extends e{constructor(){super(...arguments),this.generatorOptions=null,this.showGenerator=!1,this.layout=null}static get properties(){return l(l({},super.properties),{},{generatorOptions:{type:Object,attribute:"generator-options"},showGenerator:{type:Boolean,attribute:"show-generator"},layout:{}})}renderControl(){var e;return a(d||(d=p` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" theme="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} </vaadin-password-field> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.layout)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.showGenerator?this.__renderGenerator():"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderGenerator(){return a(h||(h=p` <div data-testid="generator" class="${0}" slot="suffix" @click="${0}"> ${0} </div> `),i({"w-s h-s flex items-center justify-center cursor-default transition-colors":!0,"text-contrast-60 hover-text-contrast-80":!this.disabled&&!this.readonly,"text-contrast-20":this.disabled||this.readonly}),(()=>{var e,t,r,a;let o,l=!1,s=0;do{o=m(null!==(e=this.generatorOptions)&&void 0!==e?e:void 0),l=null===(a=null===(r=null===(t=this.generatorOptions)||void 0===t?void 0:t.checkStrength)||void 0===r?void 0:r.call(t,o))||void 0===a||a,s++}while(!l&&s<100);if(!l)throw new Error("Failed to generate a strong password.");this._value=o;const i=this.renderRoot.querySelector("vaadin-password-field");null==i||i._setPasswordVisible(!0)}),o(u||(u=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.15em; height: 1.15em"><path d="M15.98 1.804a1 1 0 00-1.96 0l-.24 1.192a1 1 0 01-.784.785l-1.192.238a1 1 0 000 1.962l1.192.238a1 1 0 01.785.785l.238 1.192a1 1 0 001.962 0l.238-1.192a1 1 0 01.785-.785l1.192-.238a1 1 0 000-1.962l-1.192-.238a1 1 0 01-.785-.785l-.238-1.192zM6.949 5.684a1 1 0 00-1.898 0l-.683 2.051a1 1 0 01-.633.633l-2.051.683a1 1 0 000 1.898l2.051.684a1 1 0 01.633.632l.683 2.051a1 1 0 001.898 0l.683-2.051a1 1 0 01.633-.633l2.051-.683a1 1 0 000-1.898l-2.051-.683a1 1 0 01-.633-.633L6.95 5.684zM13.949 13.684a1 1 0 00-1.898 0l-.184.551a1 1 0 01-.632.633l-.551.183a1 1 0 000 1.898l.551.183a1 1 0 01.633.633l.183.551a1 1 0 001.898 0l.184-.551a1 1 0 01.632-.633l.551-.183a1 1 0 000-1.898l-.551-.184a1 1 0 01-.633-.632l-.183-.551z" /></svg>`)))}});
@@ -1 +1 @@
1
- import{_ as r}from"./shared-cb58dfcd.js";import{p as s}from"./shared-72ebbdcd.js";function t(t){var d;const n=s(t),o=null!==(d={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[n.units])&&void 0!==d?d:n.units;return r(r({},n),{},{units:o})}export{t as p};
1
+ import{_ as r}from"./shared-cb58dfcd.js";import{p as s}from"./shared-5c6a00e9.js";function t(t){var a;const n=s(t),o=null!==(a={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[n.units])&&void 0!==a?a:n.units;return r(r({},n),{},{units:o})}export{t as p};
@@ -1,2 +1,2 @@
1
- import{a as e}from"./shared-92f7ee94.js";import{_ as r}from"./shared-cb58dfcd.js";import{c as t,h as s}from"./shared-ba5c42c7.js";import{r as a}from"./shared-5fd5805c.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return r(r({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,t(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let r,t,o;return this.disabled?(r="bg-contrast-5 text-disabled",o="text-disabled",this.readonly?(r+=" border-dashed border-contrast-20",t="border-dashed border-contrast-30"):(r+=" border-transparent",t="border-contrast-10")):this.readonly?(r="border-dashed border-contrast-30 bg-transparent text-secondary",t="border-dashed border-contrast-30",o="text-secondary",this.__focused&&(t+=" ring-2 ring-primary-50")):this.__focused?(r="border-transparent bg-contrast-10 text-tertiary",t="border-primary-50 ring-1 ring-primary-50",o="text-body"):this.__hovered?(r="border-transparent bg-contrast-20 text-tertiary",t="border-contrast-20",o="text-body"):(r="border-transparent bg-contrast-10 text-tertiary",t="border-contrast-10",o="text-body"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-s leading-s" ?hidden="${0}"> <div class="transition-colors text-l font-medium" part="label">${0}</div> <div class="transition-colors text-s text-secondary" part="helper-text"> ${0} </div> </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
1
+ import{a as e}from"./shared-f00ebf92.js";import{_ as r}from"./shared-cb58dfcd.js";import{c as t,h as s}from"./shared-ba5c42c7.js";import{r as a}from"./shared-5fd5805c.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return r(r({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,t(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let r,t,o;return this.disabled?(r="bg-contrast-5 text-disabled",o="text-disabled",this.readonly?(r+=" border-dashed border-contrast-20",t="border-dashed border-contrast-30"):(r+=" border-transparent",t="border-contrast-10")):this.readonly?(r="border-dashed border-contrast-30 bg-transparent text-secondary",t="border-dashed border-contrast-30",o="text-secondary",this.__focused&&(t+=" ring-2 ring-primary-50")):this.__focused?(r="border-transparent bg-contrast-10 text-tertiary",t="border-primary-50 ring-1 ring-primary-50",o="text-body"):this.__hovered?(r="border-transparent bg-contrast-20 text-tertiary",t="border-contrast-20",o="text-body"):(r="border-transparent bg-contrast-10 text-tertiary",t="border-contrast-10",o="text-body"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-s leading-s" ?hidden="${0}"> <div class="transition-colors text-l font-medium" part="label">${0}</div> <div class="transition-colors text-s text-secondary" part="helper-text"> ${0} </div> </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
2
2
  </textarea> </div> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> </label> `),(()=>this.__hovered=!0),(()=>this.__hovered=!1),!this.label&&!this.helperText,this.label,this.helperText,t,r,a(null!==(e=this._value.split("\n"))&&void 0!==e?e:[],((e,r)=>String(r)),((e,r)=>s(d||(d=c`<div>${0}${0}<span>${0}<span></span></span></div>`),r<9?s(l||(l=c`<span class="opacity-0">0</span>`)):"",r<99?s(n||(n=c`<span class="opacity-0">0</span>`)):"",r+1))),this.placeholder,o,this._value,this.disabled,this.readonly,(()=>this.__focused=!0),(()=>{this.__focused=!1,this.__isErrorVisible=!0}),(e=>{const r=e.currentTarget;this._value=r.value}),!this.__isErrorVisible||!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}updated(e){super.updated(e),this.renderRoot.querySelectorAll("textarea").forEach((e=>{e.style.height="auto",e.style.height=`${e.scrollHeight}px`,e.style.overflowY="hidden"}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
@@ -1 +1 @@
1
- import"./shared-2fe84d72.js";import{b as r}from"./shared-92f7ee94.js";import"./foxy-form-dialog.js";import"./shared-72ebbdcd.js";import{_ as e}from"./shared-cb58dfcd.js";import{i as t}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";let a,i=r=>r;customElements.define("foxy-internal-bulk-add-action-control",class extends r{constructor(){super(...arguments),this.related=[],this.parent=null,this.form=null}static get properties(){return e(e({},super.properties),{},{related:{type:Array},parent:{},form:{}})}renderControl(){var r,e;return o(a||(a=i` <foxy-form-dialog header="header" parent="${0}" infer="dialog" form="${0}" alert .related="${0}"> </foxy-form-dialog> <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_text"></foxy-i18n> </vaadin-button> `),t(null!==(r=this.parent)&&void 0!==r?r:void 0),t(null!==(e=this.form)&&void 0!==e?e:void 0),this.related,this.disabled,(r=>{const e=this.renderRoot.querySelector("foxy-form-dialog"),t=r.target;e&&(e.href="",e.show(t))}))}});
1
+ import"./shared-2fe84d72.js";import{b as r}from"./shared-f00ebf92.js";import"./foxy-form-dialog.js";import"./shared-5c6a00e9.js";import{_ as e}from"./shared-cb58dfcd.js";import{i as t}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";let a,i=r=>r;customElements.define("foxy-internal-bulk-add-action-control",class extends r{constructor(){super(...arguments),this.related=[],this.parent=null,this.form=null}static get properties(){return e(e({},super.properties),{},{related:{type:Array},parent:{},form:{}})}renderControl(){var r,e;return o(a||(a=i` <foxy-form-dialog header="header" parent="${0}" infer="dialog" form="${0}" alert .related="${0}"> </foxy-form-dialog> <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_text"></foxy-i18n> </vaadin-button> `),t(null!==(r=this.parent)&&void 0!==r?r:void 0),t(null!==(e=this.form)&&void 0!==e?e:void 0),this.related,this.disabled,(r=>{const e=this.renderRoot.querySelector("foxy-form-dialog"),t=r.target;e&&(e.href="",e.show(t))}))}});
@@ -1 +1 @@
1
- import"./shared-e69c94bd.js";import"./shared-acbcad2e.js";import"./shared-619235ab.js";import"./shared-fe56bcdb.js";import"./shared-1cd9967e.js";import{a as e}from"./shared-92f7ee94.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as i,h as a,s}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget;this._value=this.__i18n.formatValue([t.value,r])}),o({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))),this.helperText,this.disabled||this.readonly,this._errorMessage)}});
1
+ import"./shared-e69c94bd.js";import"./shared-acbcad2e.js";import"./shared-619235ab.js";import"./shared-fe56bcdb.js";import"./shared-1cd9967e.js";import{a as e}from"./shared-f00ebf92.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as i,h as a,s}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget;this._value=this.__i18n.formatValue([t.value,r])}),o({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))),this.helperText,this.disabled||this.readonly,this._errorMessage)}});
@@ -1 +1 @@
1
- import"./shared-535d1ec6.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-72ebbdcd.js";import{a as e}from"./shared-92f7ee94.js";import{m as i,_ as t}from"./shared-cb58dfcd.js";import{N as r}from"./shared-f83207fb.js";import{i as s}from"./shared-53e42a77.js";import{c as n}from"./shared-4e709717.js";import{h as o,c as a}from"./shared-ba5c42c7.js";let l,d,h,c,u,f=e=>e;customElements.define("foxy-internal-async-resource-link-list-control",class extends e{constructor(){super(...arguments),this.foreignKeyForUri=null,this.foreignKeyForId=null,this.ownKeyForUri=null,this.optionsHref=null,this.linksHref=null,this.embedKey=null,this.ownUri=null,this.limit=20,this.item=null,this.__getItemRenderer=i(((e,i)=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer=""\n ${i?".data=${ctx.data}":"href=${ctx.href}"}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)),((...e)=>e.join())),this.__renderItem=e=>{var i;const t=this.__getItemRenderer(this.item,!!e.data),r=e=>o(l||(l=f` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)">${0}</div> `),e);if(!e.href||e.href.startsWith("foxy://"))return r(t(e));if(this.readonly)return r(t(e));const s=this.foreignKeyForUri,n=s?null===(i=this.__allLinks)||void 0===i?void 0:i.find((i=>i[s]===e.href)):void 0,a=this.disabled||!this.__allLinks||this.__isFetching;return r(o(d||(d=f` <vaadin-checkbox class="block" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="transition-opacity ${0}"> ${0} </div> </vaadin-checkbox> `),a,!!n,(i=>{var t,r,s;i.currentTarget.checked?this.__insertLink(null!==(r=null===(t=e.data)||void 0===t?void 0:t._links.self.href)&&void 0!==r?r:""):this.__deleteLink(null!==(s=null==n?void 0:n._links.self.href)&&void 0!==s?s:"")}),a?"opacity-50":"opacity-100",t(e)))},this.__isFetching=!1}static get properties(){return t(t({},super.properties),{},{foreignKeyForUri:{attribute:"foreign-key-for-uri"},foreignKeyForId:{attribute:"foreign-key-for-id"},ownKeyForUri:{attribute:"own-key-for-uri"},optionsHref:{attribute:"options-href"},linksHref:{attribute:"links-href"},embedKey:{attribute:"embed-key"},ownUri:{attribute:"own-uri"},limit:{type:Number},item:{},__isFetching:{attribute:!1}})}static get styles(){return[super.styles,a(h||(h=f`vaadin-checkbox::part(label){margin:0 0 0 calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);align-self:center}`))]}renderControl(){var e;let i;try{const t=new URL(null!==(e=this.optionsHref)&&void 0!==e?e:"");t.searchParams.set("limit",this.limit.toString()),i=t.toString()}catch(e){i=void 0}const t=this.__isFetching||!this.__allLinks;return o(c||(c=f` <div class="group"> <div class="mb-s" ?hidden="${0}"> <div class="flex justify-between font-medium text-l" ?hidden="${0}"> <span>${0}</span> <foxy-i18n class="transition-opacity ${0}" infer="" key="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page infer="card" class="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> ${0} </div> `),!this.label&&!this.helperText,!this.label,this.label,t?"opacity-100":"opacity-0",this.__isFetching?"status_saving":"status_loading",!this.helperText,this.helperText,s(i),n({"block transition-colors divide-y rounded overflow-hidden":!0,"bg-contrast-5 divide-contrast-10":!0}),this.__renderItem,!this._errorMessage||this.disabled||this.readonly,this._errorMessage,this.__renderLinkResourceLoaders())}updated(e){var i,t;super.updated(e),e.has("item")&&(null===(t=(i=this.__getItemRenderer.cache).clear)||void 0===t||t.call(i))}async __insertLink(e){var i,t,s,n,o,a;this.__isFetching=!0;const l=new r.API(this),d=await l.fetch(null!==(i=this.linksHref)&&void 0!==i?i:"",{method:"POST",body:JSON.stringify({[null!==(t=this.foreignKeyForUri)&&void 0!==t?t:""]:e,[null!==(s=this.ownKeyForUri)&&void 0!==s?s:""]:this.ownUri})});if(d.ok){const e=await d.json(),i=await l.fetch(e._links.self.href);if(i.ok){const t=r.Rumour(null!==(o=null===(n=this.nucleon)||void 0===n?void 0:n.group)&&void 0!==o?o:""),s=await i.json();t.share({related:[null!==(a=this.linksHref)&&void 0!==a?a:""],source:e._links.self.href,data:s})}}this.__isFetching=!1}async __deleteLink(e){var i,t,s;this.__isFetching=!0;const n=new r.API(this);if((await n.fetch(e,{method:"DELETE"})).ok){r.Rumour(null!==(t=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==t?t:"").share({related:[null!==(s=this.linksHref)&&void 0!==s?s:""],source:e,data:null})}this.__isFetching=!1}__renderLinkResourceLoaders(){var e,i,t;const r=200,s=this.renderRoot.querySelector("[data-link-page]"),n=Number(null!==(i=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.total_items)&&void 0!==i?i:r),a=[];try{for(let e=0;e<Math.max(1,Math.ceil(n/r));e++){const i=new URL(null!==(t=this.linksHref)&&void 0!==t?t:"");i.searchParams.set("offset",String(e*r)),i.searchParams.set("limit",String(r)),a.push(i.toString())}}catch(e){}return a.map((e=>o(u||(u=f` <foxy-nucleon class="hidden" data-link-page infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e,(()=>this.requestUpdate()))))}get __allLinks(){var e,i;const t=this.embedKey;if(!t)return null;const r=this.renderRoot.querySelectorAll("[data-link-page]"),s=[];for(const n of r){const r=null===(i=null===(e=n.data)||void 0===e?void 0:e._embedded)||void 0===i?void 0:i[t];if(!r)return null;s.push(...r)}return s}});
1
+ import"./shared-535d1ec6.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-5c6a00e9.js";import{a as e}from"./shared-f00ebf92.js";import{m as i,_ as t}from"./shared-cb58dfcd.js";import{N as r}from"./shared-f83207fb.js";import{i as s}from"./shared-53e42a77.js";import{c as n}from"./shared-4e709717.js";import{h as o,c as a}from"./shared-ba5c42c7.js";let l,d,h,c,u,f=e=>e;customElements.define("foxy-internal-async-resource-link-list-control",class extends e{constructor(){super(...arguments),this.foreignKeyForUri=null,this.foreignKeyForId=null,this.ownKeyForUri=null,this.optionsHref=null,this.linksHref=null,this.embedKey=null,this.ownUri=null,this.limit=20,this.item=null,this.__getItemRenderer=i(((e,i)=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer=""\n ${i?".data=${ctx.data}":"href=${ctx.href}"}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)),((...e)=>e.join())),this.__renderItem=e=>{var i;const t=this.__getItemRenderer(this.item,!!e.data),r=e=>o(l||(l=f` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)">${0}</div> `),e);if(!e.href||e.href.startsWith("foxy://"))return r(t(e));if(this.readonly)return r(t(e));const s=this.foreignKeyForUri,n=s?null===(i=this.__allLinks)||void 0===i?void 0:i.find((i=>i[s]===e.href)):void 0,a=this.disabled||!this.__allLinks||this.__isFetching;return r(o(d||(d=f` <vaadin-checkbox class="block" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="transition-opacity ${0}"> ${0} </div> </vaadin-checkbox> `),a,!!n,(i=>{var t,r,s;i.currentTarget.checked?this.__insertLink(null!==(r=null===(t=e.data)||void 0===t?void 0:t._links.self.href)&&void 0!==r?r:""):this.__deleteLink(null!==(s=null==n?void 0:n._links.self.href)&&void 0!==s?s:"")}),a?"opacity-50":"opacity-100",t(e)))},this.__isFetching=!1}static get properties(){return t(t({},super.properties),{},{foreignKeyForUri:{attribute:"foreign-key-for-uri"},foreignKeyForId:{attribute:"foreign-key-for-id"},ownKeyForUri:{attribute:"own-key-for-uri"},optionsHref:{attribute:"options-href"},linksHref:{attribute:"links-href"},embedKey:{attribute:"embed-key"},ownUri:{attribute:"own-uri"},limit:{type:Number},item:{},__isFetching:{attribute:!1}})}static get styles(){return[super.styles,a(h||(h=f`vaadin-checkbox::part(label){margin:0 0 0 calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);align-self:center}`))]}renderControl(){var e;let i;try{const t=new URL(null!==(e=this.optionsHref)&&void 0!==e?e:"");t.searchParams.set("limit",this.limit.toString()),i=t.toString()}catch(e){i=void 0}const t=this.__isFetching||!this.__allLinks;return o(c||(c=f` <div class="group"> <div class="mb-s" ?hidden="${0}"> <div class="flex justify-between font-medium text-l" ?hidden="${0}"> <span>${0}</span> <foxy-i18n class="transition-opacity ${0}" infer="" key="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page infer="card" class="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> ${0} </div> `),!this.label&&!this.helperText,!this.label,this.label,t?"opacity-100":"opacity-0",this.__isFetching?"status_saving":"status_loading",!this.helperText,this.helperText,s(i),n({"block transition-colors divide-y rounded overflow-hidden":!0,"bg-contrast-5 divide-contrast-10":!0}),this.__renderItem,!this._errorMessage||this.disabled||this.readonly,this._errorMessage,this.__renderLinkResourceLoaders())}updated(e){var i,t;super.updated(e),e.has("item")&&(null===(t=(i=this.__getItemRenderer.cache).clear)||void 0===t||t.call(i))}async __insertLink(e){var i,t,s,n,o,a;this.__isFetching=!0;const l=new r.API(this),d=await l.fetch(null!==(i=this.linksHref)&&void 0!==i?i:"",{method:"POST",body:JSON.stringify({[null!==(t=this.foreignKeyForUri)&&void 0!==t?t:""]:e,[null!==(s=this.ownKeyForUri)&&void 0!==s?s:""]:this.ownUri})});if(d.ok){const e=await d.json(),i=await l.fetch(e._links.self.href);if(i.ok){const t=r.Rumour(null!==(o=null===(n=this.nucleon)||void 0===n?void 0:n.group)&&void 0!==o?o:""),s=await i.json();t.share({related:[null!==(a=this.linksHref)&&void 0!==a?a:""],source:e._links.self.href,data:s})}}this.__isFetching=!1}async __deleteLink(e){var i,t,s;this.__isFetching=!0;const n=new r.API(this);if((await n.fetch(e,{method:"DELETE"})).ok){r.Rumour(null!==(t=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==t?t:"").share({related:[null!==(s=this.linksHref)&&void 0!==s?s:""],source:e,data:null})}this.__isFetching=!1}__renderLinkResourceLoaders(){var e,i,t;const r=200,s=this.renderRoot.querySelector("[data-link-page]"),n=Number(null!==(i=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.total_items)&&void 0!==i?i:r),a=[];try{for(let e=0;e<Math.max(1,Math.ceil(n/r));e++){const i=new URL(null!==(t=this.linksHref)&&void 0!==t?t:"");i.searchParams.set("offset",String(e*r)),i.searchParams.set("limit",String(r)),a.push(i.toString())}}catch(e){}return a.map((e=>o(u||(u=f` <foxy-nucleon class="hidden" data-link-page infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e,(()=>this.requestUpdate()))))}get __allLinks(){var e,i;const t=this.embedKey;if(!t)return null;const r=this.renderRoot.querySelectorAll("[data-link-page]"),s=[];for(const n of r){const r=null===(i=null===(e=n.data)||void 0===e?void 0:e._embedded)||void 0===i?void 0:i[t];if(!r)return null;s.push(...r)}return s}});
@@ -1 +1 @@
1
- import{_ as e,l as t,B as r}from"./shared-cb58dfcd.js";import{a as s,T as i,w as n}from"./shared-3c0dcb9e.js";import{s as o}from"./shared-0aedd809.js";import"./shared-2fe84d72.js";import"./shared-72ebbdcd.js";import"./shared-5212ef4f.js";import{C as l}from"./shared-5afb584d.js";import{h as a,r as d,L as h}from"./shared-ba5c42c7.js";import{I as c}from"./shared-2aa23b5f.js";import{N as u}from"./shared-f83207fb.js";import"./shared-f2f81cda.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import{g as p}from"./shared-bab2ea2c.js";import{c as f}from"./shared-4e709717.js";let y,m,x,_,b=e=>e;class v extends(l(s(i(c(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 u?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=a(y||(y=b` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);d(e,this)}updated(e){super.updated(e),this.renderLightDom()}renderControl(){return a(m||(m=b``))}render(){return this.hidden?a(x||(x=b``)):a(_||(_=b` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}customElements.define("foxy-internal-control",v);class g extends v{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);return this.jsonPath?t(JSON.parse(null!=r?r:this.jsonTemplate),this.jsonPath):r},this.setValue=e=>{var t,r,s,i,n,l,a,d,h;const[c,...u]=this.property.split(".");if(u.length){const l=null!==(r=null===(t=this.nucleon)||void 0===t?void 0:t.form[c])&&void 0!==r?r:{};if(this.jsonPath){const t=JSON.parse(null!==(i=null===(s=this.nucleon)||void 0===s?void 0:s.form[c])&&void 0!==i?i:this.jsonTemplate);o(t,this.jsonPath,e),o(l,u,JSON.stringify(t))}else o(l,u,e);null===(n=this.nucleon)||void 0===n||n.edit({[c]:l})}else if(this.jsonPath){const t=JSON.parse(null!==(a=null===(l=this.nucleon)||void 0===l?void 0:l.form[c])&&void 0!==a?a:this.jsonTemplate);o(t,this.jsonPath,e),null===(d=this.nucleon)||void 0===d||d.edit({[c]:JSON.stringify(t)})}else null===(h=this.nucleon)||void 0===h||h.edit({[c]: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);let $,S=e=>e;customElements.define("foxy-internal-timestamps-control",class extends v{renderControl(){return a($||($=S` <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:t(this,"nucleon.data.date_created")},{value:t(this,"nucleon.data.date_modified")})}});let k,j=e=>e;customElements.define("foxy-internal-submit-control",class extends v{constructor(){super(...arguments),this.theme="primary"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(k||(k=j` <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,T=e=>e;customElements.define("foxy-internal-delete-control",class extends v{constructor(){super(...arguments),this.theme="error"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(P||(P=T` <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 E,V=e=>e;customElements.define("foxy-internal-undo-control",class extends v{constructor(){super(...arguments),this.theme="secondary"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(E||(E=V` <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 O,A,C,N,q,w,U,J,I,B,H,L,K,W=e=>e;const D=l(i(u));class F extends D{constructor(){super(...arguments),this.status=null}static get properties(){return e(e({},super.properties),{},{status:{type:Object}})}renderHeaderActions(e){return null}get headerTitleKey(){return"title"}get headerTitleOptions(){return e(e({},this.data),{},{context:this.data?"existing":"new",id:this.data?p(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=p(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 r(e.join(" ").trim())}renderHeader(){if(this.hiddenSelector.matches("header",!0))return a(O||(O=W``));const e=this.data,t=e?this.renderHeaderActions(e):null;return a(A||(A=W` <div> ${0} <h2> <span class="flex items-center gap-s leading-xs 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?a(C||(C=W` ${0} ${0} `),this.hiddenSelector.matches("header:copy-id",!0)?"":a(N||(N=W` <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)?"":a(q||(q=W` <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?a(w||(w=W` <div class="flex items-center gap-s text-secondary leading-s"> ${0} <foxy-i18n infer="header" key="${0}" .options="${0}"> </foxy-i18n> </div> ${0} `),this.headerSubtitleBadges.map((e=>a(U||(U=W` <foxy-i18n class="border border-contrast-60 font-medium uppercase tracking-wider block rounded-s px-xs text-xs" infer="header badges" key="${0}"> </foxy-i18n> `),e.key))),this.headerSubtitleKey,this.headerSubtitleOptions,t?a(J||(J=W`<div class="mt-xs flex gap-m">${0}</div>`),t):""):"",this.renderTemplateOrSlot("header:after"))}renderBody(){return a(I||(I=W` <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 a(B||(B=W` <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"),f({"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(),f({"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")?a(H||(H=W` <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 a(L||(L=W` <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:t}){if(!this.hiddenSelector.matches("status",!0))return a(K||(K=W` <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,t,(()=>this.status=null))}}F.generalErrorPrefix="error:",customElements.define("foxy-internal-form",F);export{F as I,g as a,v as b};
1
+ import{_ as e,l as t,B as r}from"./shared-cb58dfcd.js";import{a as s,T as i,w as n}from"./shared-3c0dcb9e.js";import{s as o}from"./shared-0aedd809.js";import"./shared-2fe84d72.js";import"./shared-5c6a00e9.js";import"./shared-5212ef4f.js";import{C as l}from"./shared-5afb584d.js";import{h as a,r as d,L as h}from"./shared-ba5c42c7.js";import{I as c}from"./shared-2aa23b5f.js";import{N as u}from"./shared-f83207fb.js";import"./shared-7eefc244.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import{g as p}from"./shared-bab2ea2c.js";import{c as f}from"./shared-4e709717.js";let y,m,x,_,v=e=>e;class b extends(l(s(i(c(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 u?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=a(y||(y=v` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);d(e,this)}updated(e){super.updated(e),this.renderLightDom()}renderControl(){return a(m||(m=v``))}render(){return this.hidden?a(x||(x=v``)):a(_||(_=v` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}customElements.define("foxy-internal-control",b);class g extends b{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);return this.jsonPath?t(JSON.parse(null!=r?r:this.jsonTemplate),this.jsonPath):r},this.setValue=e=>{var t,r,s,i,n,l,a,d,h;const[c,...u]=this.property.split(".");if(u.length){const l=null!==(r=null===(t=this.nucleon)||void 0===t?void 0:t.form[c])&&void 0!==r?r:{};if(this.jsonPath){const t=JSON.parse(null!==(i=null===(s=this.nucleon)||void 0===s?void 0:s.form[c])&&void 0!==i?i:this.jsonTemplate);o(t,this.jsonPath,e),o(l,u,JSON.stringify(t))}else o(l,u,e);null===(n=this.nucleon)||void 0===n||n.edit({[c]:l})}else if(this.jsonPath){const t=JSON.parse(null!==(a=null===(l=this.nucleon)||void 0===l?void 0:l.form[c])&&void 0!==a?a:this.jsonTemplate);o(t,this.jsonPath,e),null===(d=this.nucleon)||void 0===d||d.edit({[c]:JSON.stringify(t)})}else null===(h=this.nucleon)||void 0===h||h.edit({[c]: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);let $,S=e=>e;customElements.define("foxy-internal-timestamps-control",class extends b{renderControl(){return a($||($=S` <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:t(this,"nucleon.data.date_created")},{value:t(this,"nucleon.data.date_modified")})}});let k,j=e=>e;customElements.define("foxy-internal-submit-control",class extends b{constructor(){super(...arguments),this.theme="primary"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(k||(k=j` <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,T=e=>e;customElements.define("foxy-internal-delete-control",class extends b{constructor(){super(...arguments),this.theme="error"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(P||(P=T` <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 E,V=e=>e;customElements.define("foxy-internal-undo-control",class extends b{constructor(){super(...arguments),this.theme="secondary"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(E||(E=V` <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 O,A,C,N,q,w,U,J,I,B,H,L,K,W=e=>e;const D=l(i(u));class F extends D{constructor(){super(...arguments),this.status=null}static get properties(){return e(e({},super.properties),{},{status:{type:Object}})}renderHeaderActions(e){return null}get headerTitleKey(){return"title"}get headerTitleOptions(){return e(e({},this.data),{},{context:this.data?"existing":"new",id:this.data?p(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=p(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 r(e.join(" ").trim())}renderHeader(){if(this.hiddenSelector.matches("header",!0))return a(O||(O=W``));const e=this.data,t=e?this.renderHeaderActions(e):null;return a(A||(A=W` <div> ${0} <h2> <span class="flex items-center gap-s leading-xs 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?a(C||(C=W` ${0} ${0} `),this.hiddenSelector.matches("header:copy-id",!0)?"":a(N||(N=W` <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)?"":a(q||(q=W` <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?a(w||(w=W` <div class="flex items-center gap-s text-secondary leading-s"> ${0} <foxy-i18n infer="header" key="${0}" .options="${0}"> </foxy-i18n> </div> ${0} `),this.headerSubtitleBadges.map((e=>a(U||(U=W` <foxy-i18n class="border border-contrast-60 font-medium uppercase tracking-wider block rounded-s px-xs text-xs" infer="header badges" key="${0}"> </foxy-i18n> `),e.key))),this.headerSubtitleKey,this.headerSubtitleOptions,t?a(J||(J=W`<div class="mt-xs flex gap-m">${0}</div>`),t):""):"",this.renderTemplateOrSlot("header:after"))}renderBody(){return a(I||(I=W` <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 a(B||(B=W` <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"),f({"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(),f({"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")?a(H||(H=W` <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 a(L||(L=W` <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:t}){if(!this.hiddenSelector.matches("status",!0))return a(K||(K=W` <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,t,(()=>this.status=null))}}F.generalErrorPrefix="error:",customElements.define("foxy-internal-form",F);export{F as I,g as a,b};
@@ -1 +1 @@
1
- import{_ as e}from"./shared-cb58dfcd.js";import{B as t}from"./shared-2fe84d72.js";import{c as r,h as s}from"./shared-ba5c42c7.js";import{y as n}from"./shared-3c0dcb9e.js";import{I as o}from"./shared-72536261.js";let i,a,c,l=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=l`: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=l` <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(c||(c=l` <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 e}from"./shared-cb58dfcd.js";import{B as t}from"./shared-2fe84d72.js";import{c as r,h as s}from"./shared-ba5c42c7.js";import{y as n}from"./shared-3c0dcb9e.js";import{I as o}from"./shared-375c365e.js";let i,a,c,l=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=l`: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=l` <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(c||(c=l` <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};
@@ -96,20 +96,15 @@
96
96
  "clear": "Clear"
97
97
  },
98
98
  "charge-past-due": {
99
- "button": {
100
- "idle": "Charge past due amount",
101
- "busy": "Processing..."
102
- },
103
- "notification": {
104
- "success": "Past due amount successfully charged.",
105
- "error": "Failed to charge past due amount."
106
- },
107
- "confirm-dialog": {
108
- "message": "This will attempt to charge the past due amount of {{ amount, price }}. Would you like to proceed?",
109
- "confirm": "Yes",
110
- "cancel": "No",
111
- "header": "Past due payment"
112
- }
99
+ "message_idle": "This will attempt to charge the past due amount of {{ amount, price }}. Would you like to proceed?",
100
+ "message_fail": "Failed to charge the past due amount of {{ amount, price }}. If you'd like to retry, close this dialog and click the charge past due amount button again.",
101
+ "message_done": "The past due amount of {{ amount, price }} has been charged successfully. You can close this dialog now.",
102
+ "button_close": "Close",
103
+ "button_confirm": "Charge now",
104
+ "button_cancel": "Go back",
105
+ "loading_busy": "Processing",
106
+ "header": "Past due payment",
107
+ "button": "Charge past due amount"
113
108
  }
114
109
  },
115
110
  "self-service-links": {
@@ -1162,8 +1157,8 @@
1162
1157
  "is_active_true": "Active",
1163
1158
  "spinner": {
1164
1159
  "loading_busy": "Loading",
1165
- "loading_empty": "No webhooks",
1166
- "loading_error": "Unknown error"
1160
+ "loading_error": "Unknown error",
1161
+ "loading_empty": "No webhooks"
1167
1162
  }
1168
1163
  }
1169
1164
  }
@@ -1178,14 +1173,19 @@
1178
1173
  "unchecked": "Not sent"
1179
1174
  },
1180
1175
  "process-webhook": {
1181
- "idle": "Resend datafeed",
1182
- "busy": "Resending datafeed...",
1183
- "fail": "Failed to resend datafeed",
1184
- "confirm": {
1185
- "header": "Resend datafeed",
1186
- "message": "Are you sure you'd like to resend XML datafeed for this transaction?",
1176
+ "button": {
1177
+ "idle": "Resend datafeed",
1178
+ "busy": "Processing..."
1179
+ },
1180
+ "notification": {
1181
+ "success": "XML datafeed resent successfully",
1182
+ "error": "Failed to resend datafeed"
1183
+ },
1184
+ "confirm-dialog": {
1185
+ "message": "This will attempt to resend the XML datafeed. Would you like to proceed?",
1187
1186
  "confirm": "Yes",
1188
- "cancel": "No"
1187
+ "cancel": "No",
1188
+ "header": "Resend datafeed"
1189
1189
  }
1190
1190
  }
1191
1191
  },
@@ -1983,48 +1983,48 @@
1983
1983
  },
1984
1984
  "actions": {
1985
1985
  "capture": {
1986
- "idle": "Capture",
1987
- "busy": "Capturing...",
1988
- "fail": "Failed to capture",
1989
- "confirm": {
1990
- "header": "Capture",
1991
- "message": "Are you sure you'd like to capture this transaction?",
1992
- "confirm": "Yes",
1993
- "cancel": "No"
1994
- }
1986
+ "message_idle": "This action will attempt to capture this transaction. Would you like to proceed?",
1987
+ "message_fail": "Failed to capture this transaction. If you'd like to retry, close this dialog and click the capture button again.",
1988
+ "message_done": "Transaction was captured successfully. You can close this dialog now.",
1989
+ "button_close": "Close",
1990
+ "button_confirm": "Capture",
1991
+ "button_cancel": "Go back",
1992
+ "loading_busy": "Processing",
1993
+ "header": "Capture",
1994
+ "button": "Capture"
1995
1995
  },
1996
1996
  "void": {
1997
- "idle": "Void",
1998
- "busy": "Voiding...",
1999
- "fail": "Failed to void",
2000
- "confirm": {
2001
- "header": "Void",
2002
- "message": "Are you sure you'd like to void this transaction?",
2003
- "confirm": "Yes",
2004
- "cancel": "No"
2005
- }
1997
+ "message_idle": "This action will attempt to void this transaction. Would you like to proceed?",
1998
+ "message_fail": "Failed to void this transaction. If you'd like to retry, close this dialog and click the void button again.",
1999
+ "message_done": "Transaction was voided successfully. You can close this dialog now.",
2000
+ "button_close": "Close",
2001
+ "button_confirm": "Void",
2002
+ "button_cancel": "Go back",
2003
+ "loading_busy": "Processing",
2004
+ "header": "Void",
2005
+ "button": "Void"
2006
2006
  },
2007
2007
  "refund": {
2008
- "idle": "Refund",
2009
- "busy": "Refunding...",
2010
- "fail": "Failed to refund",
2011
- "confirm": {
2012
- "header": "Refund",
2013
- "message": "Are you sure you'd like to refund this transaction?",
2014
- "confirm": "Yes",
2015
- "cancel": "No"
2016
- }
2008
+ "message_idle": "This action will attempt to refund the full amount of this transaction. Would you like to proceed?",
2009
+ "message_fail": "Failed to refund this transaction. If you'd like to retry, close this dialog and click the refund button again.",
2010
+ "message_done": "Transaction was refunded successfully. You can close this dialog now.",
2011
+ "button_close": "Close",
2012
+ "button_confirm": "Refund",
2013
+ "button_cancel": "Go back",
2014
+ "loading_busy": "Processing",
2015
+ "header": "Refund",
2016
+ "button": "Refund"
2017
2017
  },
2018
2018
  "send-emails": {
2019
- "idle": "Resend emails",
2020
- "busy": "Resending emails...",
2021
- "fail": "Failed to resend emails",
2022
- "confirm": {
2023
- "header": "Send emails",
2024
- "message": "Are you sure you'd like to send emails for this transaction?",
2025
- "confirm": "Yes",
2026
- "cancel": "No"
2027
- }
2019
+ "message_idle": "This action will attempt to resend emails for this transaction. Would you like to proceed?",
2020
+ "message_fail": "Failed to resend emails for this transaction. If you'd like to retry, close this dialog and click the resend emails button again.",
2021
+ "message_done": "Emails for this transaction were resent successfully. You can close this dialog now.",
2022
+ "button_close": "Close",
2023
+ "button_confirm": "Resend emails",
2024
+ "button_cancel": "Go back",
2025
+ "loading_busy": "Processing",
2026
+ "header": "Resend emails",
2027
+ "button": "Resend emails"
2028
2028
  },
2029
2029
  "subscription": {
2030
2030
  "caption": "Go to subscription"
@@ -79,7 +79,8 @@
79
79
  "helper_text": "",
80
80
  "code": {
81
81
  "label": "SKU",
82
- "placeholder": "Optional",
82
+ "placeholder_optional": "Optional",
83
+ "placeholder_required": "Required",
83
84
  "helper_text": ""
84
85
  },
85
86
  "parent-code": {
@@ -546,7 +547,9 @@
546
547
  "submit_caption_cart": "Add to cart",
547
548
  "submit_caption_checkout": "Purchase",
548
549
  "unavailable": {
549
- "loading_busy": "Loading preview..."
550
+ "loading_busy": "Loading preview...",
551
+ "loading_paused": "Preview paused",
552
+ "code_required": "Preview and add-to-cart code will be available once you provide an SKU for each item."
550
553
  },
551
554
  "spinner": {
552
555
  "loading_busy": "Signing",
@@ -28,7 +28,7 @@
28
28
  "option_fullpage": "Full Page"
29
29
  },
30
30
  "cart-display-config-usage": {
31
- "label": "Use default layout",
31
+ "label": "Show all product options",
32
32
  "helper_text": "",
33
33
  "checked": "Yes",
34
34
  "unchecked": "No"