@foxy.io/elements 1.41.0 → 1.42.0-beta.1
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.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +5 -5
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-admin-subscription-form.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-billing-address-card.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +2 -2
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +6 -6
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-native-integration-card.js +1 -1
- package/dist/cdn/foxy-native-integration-form.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card-embed.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +1 -1
- package/dist/cdn/foxy-reports-table.js +5 -5
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-container-card.js +1 -1
- package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-shipping-service-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -1
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +6 -6
- package/dist/cdn/foxy-update-payment-method-form.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-user-invitation-card.js +1 -1
- package/dist/cdn/foxy-user-invitation-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-a477b90e.js → shared-06ea7911.js} +1 -1
- package/dist/cdn/{shared-8697a27e.js → shared-0a3456e2.js} +1 -1
- package/dist/cdn/{shared-29b0ef56.js → shared-0bd12eb3.js} +1 -1
- package/dist/cdn/{shared-f7db49fe.js → shared-145cbef6.js} +1 -1
- package/dist/cdn/{shared-c19d73fe.js → shared-1f61d033.js} +1 -1
- package/dist/cdn/{shared-ef4d09da.js → shared-20a022b2.js} +1 -1
- package/dist/cdn/{shared-c003fbf3.js → shared-230e734d.js} +1 -1
- package/dist/cdn/{shared-379b6e13.js → shared-2380c9d2.js} +1 -1
- package/dist/cdn/{shared-2931ccbe.js → shared-2771c166.js} +1 -1
- package/dist/cdn/{shared-1522e7b0.js → shared-3530c8a0.js} +3 -3
- package/dist/cdn/{shared-375c365e.js → shared-3cccbb5d.js} +1 -1
- package/dist/cdn/{shared-b82e43e5.js → shared-4209dfe0.js} +1 -1
- package/dist/cdn/{shared-43c39c6f.js → shared-49229e84.js} +1 -1
- package/dist/cdn/{shared-0ae48c81.js → shared-4bb3e49d.js} +1 -1
- package/dist/cdn/{shared-922db328.js → shared-4ee1334c.js} +1 -1
- package/dist/cdn/{shared-69943b4f.js → shared-54d27623.js} +1 -1
- package/dist/cdn/shared-5946ce36.js +1 -0
- package/dist/cdn/{shared-2fe84d72.js → shared-604bd64e.js} +1 -1
- package/dist/cdn/{shared-1f659198.js → shared-659c8a65.js} +1 -1
- package/dist/cdn/{shared-cdaf66d3.js → shared-6ce6abaa.js} +1 -1
- package/dist/cdn/{shared-3ad093b5.js → shared-745dc4d4.js} +1 -1
- package/dist/cdn/{shared-0179fbaa.js → shared-77768847.js} +1 -1
- package/dist/cdn/{shared-1cd9967e.js → shared-7a590074.js} +1 -1
- package/dist/cdn/{shared-3c0dcb9e.js → shared-7cea4c84.js} +1 -1
- package/dist/cdn/{shared-58c0c5cc.js → shared-821e79ec.js} +1 -1
- package/dist/cdn/shared-86a5f951.js +1 -0
- package/dist/cdn/{shared-dc383217.js → shared-87a1acfc.js} +1 -1
- package/dist/cdn/{shared-7f14ea13.js → shared-8c7c4256.js} +2 -2
- package/dist/cdn/{shared-6ce9d926.js → shared-8d72d808.js} +1 -1
- package/dist/cdn/{shared-7eefc244.js → shared-8edadb80.js} +1 -1
- package/dist/cdn/shared-8fa71a41.js +1 -0
- package/dist/cdn/{shared-d298bb95.js → shared-9159476e.js} +1 -1
- package/dist/cdn/{shared-499c03b8.js → shared-9ecf3054.js} +1 -1
- package/dist/cdn/shared-a224362a.js +1 -0
- package/dist/cdn/{shared-ed3fc85e.js → shared-a5d2debf.js} +1 -1
- package/dist/cdn/{shared-34cbd863.js → shared-a92f5e58.js} +1 -1
- package/dist/cdn/{shared-3c7e55e4.js → shared-a969a617.js} +1 -1
- package/dist/cdn/{shared-a146c6a5.js → shared-adb9ded3.js} +1 -1
- package/dist/cdn/{shared-c71fb90f.js → shared-b34d37c9.js} +1 -1
- package/dist/cdn/{shared-535d1ec6.js → shared-b68bcfd9.js} +1 -1
- package/dist/cdn/{shared-8ae33bf4.js → shared-bb1b557c.js} +1 -1
- package/dist/cdn/{shared-504d2acb.js → shared-bd49e2a9.js} +3 -3
- package/dist/cdn/{shared-a0570012.js → shared-c1485ee6.js} +1 -1
- package/dist/cdn/{shared-cfea6000.js → shared-c2d29bc4.js} +1 -1
- package/dist/cdn/{shared-e69c94bd.js → shared-c3244bea.js} +1 -1
- package/dist/cdn/{shared-2a941373.js → shared-c6571ff9.js} +1 -1
- package/dist/cdn/{shared-12ea5def.js → shared-cbc9e356.js} +1 -1
- package/dist/cdn/{shared-619235ab.js → shared-cc4ba2a7.js} +1 -1
- package/dist/cdn/{shared-65763e6f.js → shared-ccb20339.js} +1 -1
- package/dist/cdn/{shared-acbcad2e.js → shared-ce959545.js} +1 -1
- package/dist/cdn/{shared-44209364.js → shared-d5675aee.js} +1 -1
- package/dist/cdn/{shared-70bcd6ae.js → shared-d59189e6.js} +1 -1
- package/dist/cdn/{shared-14209e60.js → shared-da05b8be.js} +1 -1
- package/dist/cdn/{shared-5988dd30.js → shared-de1f3b1b.js} +1 -1
- package/dist/cdn/shared-e00ce626.js +1 -0
- package/dist/cdn/{shared-a4a847e4.js → shared-e106a219.js} +1 -1
- package/dist/cdn/{shared-3f381f99.js → shared-e4a6f686.js} +1 -1
- package/dist/cdn/{shared-5231970e.js → shared-f31a41d9.js} +1 -1
- package/dist/cdn/{shared-58a50b35.js → shared-f4c2858b.js} +1 -1
- package/dist/cdn/{shared-62a913ef.js → shared-f5988321.js} +1 -1
- package/dist/cdn/{shared-58f1f368.js → shared-f982fceb.js} +1 -1
- package/dist/cdn/{shared-30829c7f.js → shared-fad76cdd.js} +1 -1
- package/dist/cdn/{shared-174ae849.js → shared-fccf4b6a.js} +1 -1
- package/dist/cdn/{shared-54031a26.js → shared-fd1aad37.js} +2 -2
- package/dist/cdn/{shared-fe56bcdb.js → shared-fdd1f5f8.js} +1 -1
- package/dist/cdn/{shared-5c6a00e9.js → shared-ff136a00.js} +1 -1
- package/dist/cdn/translations/admin-subscription-form/en.json +64 -80
- package/dist/cdn/translations/api-browser/en.json +4 -5
- package/dist/cdn/translations/cart-form/en.json +52 -65
- package/dist/cdn/translations/coupon-code-form/en.json +4 -5
- package/dist/cdn/translations/coupon-form/en.json +16 -20
- package/dist/cdn/translations/customer/en.json +16 -20
- package/dist/cdn/translations/customer-portal/de.json +8 -10
- package/dist/cdn/translations/customer-portal/en.json +8 -10
- package/dist/cdn/translations/customer-portal/es.json +8 -10
- package/dist/cdn/translations/customer-portal/fr.json +8 -10
- package/dist/cdn/translations/customer-portal/nl.json +8 -10
- package/dist/cdn/translations/customer-portal/pl.json +8 -10
- package/dist/cdn/translations/customer-portal/sv.json +8 -10
- package/dist/cdn/translations/customer-portal/zh-HK.json +8 -10
- package/dist/cdn/translations/customer-portal-settings-form/en.json +8 -10
- package/dist/cdn/translations/experimental-add-to-cart-builder/en.json +16 -20
- package/dist/cdn/translations/gift-card-code-form/en.json +8 -10
- package/dist/cdn/translations/gift-card-form/en.json +20 -25
- package/dist/cdn/translations/item-category-form/en.json +8 -10
- package/dist/cdn/translations/item-form/en.json +20 -25
- package/dist/cdn/translations/native-integration-form/en.json +8 -10
- package/dist/cdn/translations/pagination/en.json +5 -6
- package/dist/cdn/translations/payment-method-card/en.json +4 -5
- package/dist/cdn/translations/store-shipping-method-form/en.json +16 -20
- package/dist/cdn/translations/subscription-form/en.json +12 -15
- package/dist/cdn/translations/tax-form/en.json +4 -5
- package/dist/cdn/translations/template-set-form/en.json +4 -5
- package/dist/cdn/translations/transaction/en.json +56 -70
- package/dist/cdn/translations/update-payment-method-form/en.json +4 -5
- package/dist/cdn/translations/webhook-form/en.json +8 -10
- package/dist/elements/public/Pagination/Pagination.d.ts +12 -5
- package/dist/elements/public/Pagination/Pagination.js +191 -77
- package/dist/elements/public/Pagination/Pagination.js.map +1 -1
- package/dist/elements/public/Pagination/index.d.ts +2 -2
- package/dist/elements/public/Pagination/index.js +2 -2
- package/dist/elements/public/Pagination/index.js.map +1 -1
- package/dist/mixins/themeable.js +22 -11
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-14177287.js +0 -1
- package/dist/cdn/shared-1d2c7978.js +0 -1
- package/dist/cdn/shared-58bb3dda.js +0 -1
- package/dist/cdn/shared-f00ebf92.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
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>•<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};
|