@foxy.io/elements 1.32.0 → 1.33.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/cdn/foxy-address-form.js +1 -1
  2. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  3. package/dist/cdn/foxy-api-browser.js +1 -1
  4. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  5. package/dist/cdn/foxy-attribute-form.js +1 -1
  6. package/dist/cdn/foxy-cart-form.js +2 -2
  7. package/dist/cdn/foxy-client-form.js +1 -1
  8. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  10. package/dist/cdn/foxy-coupon-form.js +1 -1
  11. package/dist/cdn/foxy-custom-field-form.js +1 -1
  12. package/dist/cdn/foxy-customer-form.js +1 -1
  13. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  14. package/dist/cdn/foxy-customer-portal.js +1 -1
  15. package/dist/cdn/foxy-customer.js +1 -1
  16. package/dist/cdn/foxy-downloadable-form.js +1 -1
  17. package/dist/cdn/foxy-email-template-form.js +1 -1
  18. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  19. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  20. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  21. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  22. package/dist/cdn/foxy-gift-card-form.js +1 -1
  23. package/dist/cdn/foxy-integration-form.js +1 -1
  24. package/dist/cdn/foxy-item-category-form.js +1 -1
  25. package/dist/cdn/foxy-item-form.js +1 -1
  26. package/dist/cdn/foxy-item-option-form.js +1 -1
  27. package/dist/cdn/foxy-native-integration-form.js +1 -1
  28. package/dist/cdn/foxy-passkey-form.js +1 -1
  29. package/dist/cdn/foxy-payment-method-card.js +1 -1
  30. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  31. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  32. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  33. package/dist/cdn/foxy-store-form.js +1 -1
  34. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  35. package/dist/cdn/foxy-subscription-form.js +1 -1
  36. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  37. package/dist/cdn/foxy-template-config-form.js +1 -1
  38. package/dist/cdn/foxy-template-form.js +1 -1
  39. package/dist/cdn/foxy-template-set-form.js +1 -1
  40. package/dist/cdn/foxy-transaction.js +1 -1
  41. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  42. package/dist/cdn/foxy-user-form.js +1 -1
  43. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  44. package/dist/cdn/foxy-users-table.js +1 -1
  45. package/dist/cdn/foxy-webhook-form.js +1 -1
  46. package/dist/cdn/shared-0203d3da.js +1 -0
  47. package/dist/cdn/shared-14179b23.js +1 -0
  48. package/dist/cdn/shared-529f2b48.js +2 -0
  49. package/dist/cdn/shared-d367ea04.js +1 -0
  50. package/dist/cdn/translations/email-template-form/en.json +99 -27
  51. package/dist/cdn/translations/item-category-form/en.json +1 -1
  52. package/dist/cdn/translations/store-form/en.json +1 -1
  53. package/dist/cdn/translations/subscription-settings-form/en.json +6 -6
  54. package/dist/cdn/translations/template-form/en.json +67 -19
  55. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControlForm.d.ts +1 -2
  56. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControlForm.js +0 -3
  57. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControlForm.js.map +1 -1
  58. package/dist/elements/internal/InternalSourceControl/InternalSourceControl.js +6 -26
  59. package/dist/elements/internal/InternalSourceControl/InternalSourceControl.js.map +1 -1
  60. package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js +1 -1
  61. package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js.map +1 -1
  62. package/dist/elements/internal/InternalTimestampsControl/InternalTimestampsControl.js +1 -1
  63. package/dist/elements/internal/InternalTimestampsControl/InternalTimestampsControl.js.map +1 -1
  64. package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/InternalCartFormCreateSessionAction.js +0 -1
  65. package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/InternalCartFormCreateSessionAction.js.map +1 -1
  66. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +12 -20
  67. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +100 -333
  68. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
  69. package/dist/elements/public/EmailTemplateForm/index.d.ts +5 -7
  70. package/dist/elements/public/EmailTemplateForm/index.js +5 -7
  71. package/dist/elements/public/EmailTemplateForm/index.js.map +1 -1
  72. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/InternalEmailTemplateFormAsyncAction.d.ts +10 -0
  73. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/InternalEmailTemplateFormAsyncAction.js +49 -0
  74. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/InternalEmailTemplateFormAsyncAction.js.map +1 -0
  75. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/index.d.ts +5 -0
  76. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/index.js +7 -0
  77. package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/index.js.map +1 -0
  78. package/dist/elements/public/EmailTemplateForm/types.d.ts +3 -1
  79. package/dist/elements/public/EmailTemplateForm/types.js.map +1 -1
  80. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +3 -3
  81. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
  82. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js +6 -6
  83. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js.map +1 -1
  84. package/dist/elements/public/TemplateForm/TemplateForm.d.ts +10 -18
  85. package/dist/elements/public/TemplateForm/TemplateForm.js +54 -305
  86. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
  87. package/dist/elements/public/TemplateForm/index.d.ts +4 -6
  88. package/dist/elements/public/TemplateForm/index.js +4 -6
  89. package/dist/elements/public/TemplateForm/index.js.map +1 -1
  90. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/InternalTemplateFormAsyncAction.d.ts +10 -0
  91. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/InternalTemplateFormAsyncAction.js +49 -0
  92. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/InternalTemplateFormAsyncAction.js.map +1 -0
  93. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/index.d.ts +5 -0
  94. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/index.js +7 -0
  95. package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/index.js.map +1 -0
  96. package/package.json +1 -1
  97. package/dist/cdn/shared-015da8ca.js +0 -1
  98. package/dist/cdn/shared-a84befbf.js +0 -1
  99. package/dist/cdn/shared-d0e0f8a1.js +0 -2
  100. package/dist/cdn/shared-fb18400f.js +0 -1
@@ -1,2 +0,0 @@
1
- import{I as e}from"./shared-2dd497e5.js";import{_ as t}from"./shared-d1195c27.js";import{c as r,h as s}from"./shared-dc73b9a5.js";import{r as a}from"./shared-a0c6a159.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 t(t({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,r(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 t,r,o,h,b;return this.disabled?(t="bg-contrast-5 text-disabled",r="text-disabled",h="text-disabled",b="text-disabled",this.readonly?(t+=" border-dashed border-contrast-20",o="border-dashed border-contrast-30"):(t+=" border-transparent",o="border-contrast-10")):this.readonly?(t="border-dashed border-contrast-30 bg-transparent text-secondary",r="text-secondary",o="border-dashed border-contrast-30",h="text-secondary",b="text-secondary",this.__focused&&(o+=" ring-2 ring-primary-50")):this.__focused?(t="border-transparent bg-contrast-10 text-tertiary",r="text-secondary",o="border-primary-50 ring-1 ring-primary-50",h="text-body",b="text-primary"):this.__hovered?(t="border-transparent bg-contrast-20 text-tertiary",r="text-body",o="border-contrast-20",h="text-body",b="text-body"):(t="border-transparent bg-contrast-10 text-tertiary",r="text-secondary",o="border-contrast-10",h="text-body",b="text-secondary"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-xs transition-colors leading-none text-s font-medium ${0}" part="label"> ${0} </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
- </textarea> </div> <div class="mt-xs transition-colors leading-xs text-xs ${0}" part="helper-text" ?hidden="${0}"> ${0} </div> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </label> `),(()=>this.__hovered=!0),(()=>this.__hovered=!1),b,this.label,o,t,a(null!==(e=this._value.split("\n"))&&void 0!==e?e:[],((e,t)=>String(t)),((e,t)=>s(d||(d=c`<div>${0}${0}<span>${0}<span></span></span></div>`),t<9?s(l||(l=c`<span class="opacity-0">0</span>`)):"",t<99?s(n||(n=c`<span class="opacity-0">0</span>`)):"",t+1))),this.placeholder,h,this._value,this.disabled,this.readonly,(()=>this.__focused=!0),(()=>{this.__focused=!1,this.__isErrorVisible=!0}),(e=>{const t=e.currentTarget;this._value=t.value}),r,!this.helperText,this.helperText,!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 +0,0 @@
1
- import"./shared-935adc3b.js";import"./shared-b3d36746.js";import{I as t}from"./shared-2dd497e5.js";import{I as e}from"./shared-015da8ca.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-form-dialog.js";import"./shared-3bfbd5af.js";import{_ as s,m as i}from"./shared-d1195c27.js";import{h as r,s as o}from"./shared-dc73b9a5.js";import{s as l}from"./shared-99940888.js";import{g as a}from"./shared-bab2ea2c.js";import{F as n}from"./shared-343d1fd7.js";import{i as d}from"./shared-9803aa7c.js";import{c as h}from"./shared-4e709717.js";import{u as c}from"./shared-e8b8c8d0.js";let u,f=t=>t;let p,y,m,v,x,b,g,$,_=t=>t;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}})}static get v8n(){return[({selection:t})=>void 0!==t||"silent:selection_required"]}renderBody(){return r(u||(u=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> `),(t=>{t.preventDefault(),this.edit({selection:t.detail}),this.submit()}),l(this.selectionProps))}}),customElements.define("foxy-internal-resource-picker-control",class extends t{constructor(){super(...arguments),this.getDisplayValueOptions=t=>({resource:t}),this.showCopyIdButton=!1,this.virtualHost=c("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((t=>new Function("ctx",`return ctx.html\`\n <${null!=t?t:"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!=t?t:"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 t;const e=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,e,null!==(t=this.form)&&void 0!==t?t:"foxy-internal-resource-picker-control-form",this.__handleFetchEvent,"summary-item"===this.layout?this.__renderSummaryItemLayout():this.__renderStandaloneLayout())}updated(t){var e,s;super.updated(t),t.has("item")&&(null===(s=(e=this.__getItemRenderer.cache).clear)||void 0===s||s.call(e))}__clear(){this._value="",this.dispatchEvent(new CustomEvent("clear"))}__renderSummaryItemLayout(){const t=this.renderRoot.querySelector("#value");return r(y||(y=_` <div class="flex items-start leading-xs gap-m"> <div class="flex-1"> <div class="text-m text-body whitespace-nowrap">${0}</div> <div class="text-s text-secondary">${0}</div> <div class="text-s text-error" ?hidden="${0}"> ${0} </div> </div> <div class="flex items-center gap-xs"> <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> <foxy-nucleon infer="" href="${0}" id="value" @update="${0}"> </foxy-nucleon> `),this.label,this.helperText,this.disabled||this.readonly,this._errorMessage,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,(t=>{if(this.disabled||this.readonly)return;const e=t.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(e)}),this._value?r(m||(m=_` <foxy-i18n infer="" key="value" .options="${0}"> </foxy-i18n> `),(null==t?void 0:t.data)?this.getDisplayValueOptions(t.data):{context:(null==t?void 0:t.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>`)),d(this._value||void 0),(()=>this.requestUpdate()))}__renderStandaloneLayout(){var t,e,s;const i="string"==typeof this._value?null===(t=this.getItemUrl)||void 0===t?void 0:t.call(this,this._value):void 0,o="string"==typeof this._value?a(this._value):void 0;return r(x||(x=_` <div class="block group"> <div class="${0}"> <span class="mr-auto">${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}"> ${0} </div> </button> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </div> `),h({"flex items-center gap-m transition-colors font-medium text-l":!0,"text-disabled":this.disabled}),this.label,i?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> `),i):"",this.showCopyIdButton&&null!==o?r(g||(g=_` <foxy-copy-to-clipboard layout="text" theme="contrast tertiary-inline" infer="copy-id" text="${0}"> </foxy-copy-to-clipboard> `),o):"",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,(t=>{const e=t.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(e)}),h({"transition-opacity":!0,"opacity-50":this.disabled}),this.__getItemRenderer(this.item)({html:r,data: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!==(s=null===(e=this.nucleon)||void 0===e?void 0:e.group)&&void 0!==s?s:"",lang:this.lang,ns:this.ns}),!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}__handleFetchEvent(t){if(!(t instanceof n))return;if(t.defaultPrevented)return;const{url:e,method:s}=t.request;return e===`foxy://${this.virtualHost}/select`&&"POST"===s?t.respondWith(this.__handleSelect(t.request)):e===`foxy://${this.virtualHost}/empty`&&"GET"===s?t.respondWith(this.__handleEmpty()):void 0}async __handleSelect(t){const e=await t.clone().json();return this._value=e.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."}))}});