@foxy.io/elements 1.51.0 → 1.52.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.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- 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-admin-transaction-card.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 +1 -1
- 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 +1 -1
- 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-nucleon-element.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 +1 -1
- 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-store-transaction-folder-card.js +1 -1
- package/dist/cdn/foxy-store-transaction-folder-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 +7 -7
- 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-5ded9f39.js → shared-02c0b25a.js} +4 -4
- package/dist/cdn/{shared-49c77c18.js → shared-058530fc.js} +1 -1
- package/dist/cdn/shared-0af553f2.js +1 -0
- package/dist/cdn/{shared-f4738502.js → shared-0f92b865.js} +1 -1
- package/dist/cdn/{shared-5b1ad45f.js → shared-0fd68dc0.js} +1 -1
- package/dist/cdn/{shared-86f4e737.js → shared-17c9e095.js} +1 -1
- package/dist/cdn/{shared-03519cae.js → shared-19073761.js} +1 -1
- package/dist/cdn/{shared-acfe37e7.js → shared-1dfc1e37.js} +1 -1
- package/dist/cdn/{shared-9c308061.js → shared-2559d303.js} +1 -1
- package/dist/cdn/{shared-fd8b44e3.js → shared-2b39e4d4.js} +1 -1
- package/dist/cdn/shared-3426159a.js +1 -0
- package/dist/cdn/{shared-70e64227.js → shared-377cce47.js} +1 -1
- package/dist/cdn/{shared-211bd1dd.js → shared-3d84ef45.js} +1 -1
- package/dist/cdn/{shared-d80549b6.js → shared-3eac4b7c.js} +1 -1
- package/dist/cdn/{shared-bb5a2cdf.js → shared-49558171.js} +1 -1
- package/dist/cdn/{shared-822537f7.js → shared-4da1f187.js} +1 -1
- package/dist/cdn/{shared-a1d07d0c.js → shared-515003f6.js} +1 -1
- package/dist/cdn/{shared-c9d67ca3.js → shared-54f824d8.js} +1 -1
- package/dist/cdn/{shared-35f59eae.js → shared-5ad5e258.js} +1 -1
- package/dist/cdn/{shared-45fd1dc1.js → shared-60497743.js} +1 -1
- package/dist/cdn/{shared-2a5c640b.js → shared-609c9693.js} +1 -1
- package/dist/cdn/{shared-300bf21a.js → shared-61ddd174.js} +1 -1
- package/dist/cdn/{shared-4818631e.js → shared-65094878.js} +1 -1
- package/dist/cdn/{shared-d91ec395.js → shared-6a0e1b94.js} +3 -3
- package/dist/cdn/{shared-e8571c37.js → shared-6bb9a580.js} +1 -1
- package/dist/cdn/{shared-2463790e.js → shared-6cdfb858.js} +1 -1
- package/dist/cdn/{shared-91fbd884.js → shared-7892fd3f.js} +1 -1
- package/dist/cdn/{shared-d0af0d8d.js → shared-79dd8c55.js} +1 -1
- package/dist/cdn/{shared-7c099d54.js → shared-80950330.js} +1 -1
- package/dist/cdn/{shared-54380337.js → shared-887ac0b0.js} +1 -1
- package/dist/cdn/{shared-9cf7a458.js → shared-8d8975d5.js} +1 -1
- package/dist/cdn/{shared-d3205195.js → shared-8df8e77c.js} +1 -1
- package/dist/cdn/{shared-5ac5253b.js → shared-9109ae93.js} +1 -1
- package/dist/cdn/{shared-75c1ce85.js → shared-96207bb5.js} +1 -1
- package/dist/cdn/{shared-4f162d81.js → shared-9687ab7b.js} +1 -1
- package/dist/cdn/{shared-bc110f4a.js → shared-99c53365.js} +1 -1
- package/dist/cdn/{shared-d53f94a0.js → shared-9a3bf65c.js} +1 -1
- package/dist/cdn/shared-9b35fe34.js +1 -0
- package/dist/cdn/{shared-02fb8ce3.js → shared-a0baefff.js} +1 -1
- package/dist/cdn/{shared-58fdefe5.js → shared-a20ef119.js} +1 -1
- package/dist/cdn/{shared-9ee4873a.js → shared-a5d6db21.js} +1 -1
- package/dist/cdn/{shared-9d0432c3.js → shared-afdf7b0c.js} +1 -1
- package/dist/cdn/shared-b1fa9899.js +1 -0
- package/dist/cdn/{shared-0682a41b.js → shared-b2f675d4.js} +1 -1
- package/dist/cdn/{shared-fe73af3a.js → shared-b5e048f5.js} +1 -1
- package/dist/cdn/{shared-9dc6233c.js → shared-b948488a.js} +1 -1
- package/dist/cdn/{shared-375d2c8b.js → shared-bbd07437.js} +1 -1
- package/dist/cdn/{shared-040485bb.js → shared-c57aac01.js} +1 -1
- package/dist/cdn/{shared-3e37477f.js → shared-c8368877.js} +1 -1
- package/dist/cdn/{shared-40475d9c.js → shared-ce05e482.js} +1 -1
- package/dist/cdn/{shared-462820a3.js → shared-d14a664a.js} +1 -1
- package/dist/cdn/{shared-e54c8946.js → shared-d2b3205f.js} +1 -1
- package/dist/cdn/{shared-3be57b19.js → shared-d55c7c67.js} +1 -1
- package/dist/cdn/{shared-891e2675.js → shared-d9f83737.js} +1 -1
- package/dist/cdn/{shared-dae65afe.js → shared-da31cee5.js} +1 -1
- package/dist/cdn/{shared-b7f25c69.js → shared-db623837.js} +1 -1
- package/dist/cdn/{shared-6545a38f.js → shared-e2d843ca.js} +4 -4
- package/dist/cdn/{shared-8dd5edce.js → shared-e6804126.js} +1 -1
- package/dist/cdn/{shared-09acffe6.js → shared-ec015a24.js} +1 -1
- package/dist/cdn/{shared-650b8749.js → shared-ec6a369a.js} +1 -1
- package/dist/cdn/{shared-52d5b281.js → shared-f8e360e6.js} +1 -1
- package/dist/cdn/{shared-ee677138.js → shared-f9a22b7a.js} +1 -1
- package/dist/cdn/{shared-b142e823.js → shared-f9e4a1cc.js} +1 -1
- package/dist/cdn/{shared-36010fae.js → shared-faa174b6.js} +1 -1
- package/dist/cdn/{shared-a7ea2b28.js → shared-fda3270b.js} +1 -1
- package/dist/cdn/translations/admin-subscription-form/en.json +64 -9
- package/dist/cdn/translations/cart-form/en.json +64 -9
- package/dist/cdn/translations/item-form/en.json +64 -9
- package/dist/cdn/translations/transaction/en.json +64 -9
- package/dist/elements/public/CouponCodesForm/CouponCodesForm.js +1 -2
- package/dist/elements/public/CouponCodesForm/CouponCodesForm.js.map +1 -1
- package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js +1 -2
- package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js.map +1 -1
- package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js +1 -2
- package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js.map +1 -1
- package/dist/elements/public/ItemForm/ItemForm.d.ts +3 -0
- package/dist/elements/public/ItemForm/ItemForm.js +79 -4
- package/dist/elements/public/ItemForm/ItemForm.js.map +1 -1
- package/dist/elements/public/ItemForm/index.d.ts +3 -0
- package/dist/elements/public/ItemForm/index.js +3 -0
- package/dist/elements/public/ItemForm/index.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.d.ts +3 -2
- package/dist/elements/public/NucleonElement/NucleonElement.js +21 -13
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/mixins/themeable.js +4 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-5e07ca45.js +0 -1
- package/dist/cdn/shared-beabe645.js +0 -1
- package/dist/cdn/shared-bf03e2e9.js +0 -1
- package/dist/cdn/shared-ceeffa02.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as e}from"./shared-
|
|
1
|
+
import{I as e}from"./shared-ec6a369a.js";import"./shared-9b35fe34.js";import{_ as t}from"./shared-8f9014ff.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,4 +1,4 @@
|
|
|
1
|
-
import{P as e,B as t,d as i}from"./shared-
|
|
1
|
+
import{P as e,B as t,d as i}from"./shared-6cdfb858.js";import{h as n}from"./shared-0fd68dc0.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aq as e,ar as t,as as s,at as a,au as i,av as n,aw as r,ax as l,o,ay as d,az as A,aA as u,aB as h,aC as c,aD as m,aE as p,m as v,_ as g,aF as y}from"./shared-8f9014ff.js";import"./shared-b7f25c69.js";import"./shared-bc110f4a.js";import"./shared-f4738502.js";import"./shared-d3205195.js";import{T as b}from"./shared-02fb8ce3.js";import"./shared-462820a3.js";import"./shared-d80549b6.js";import{d as f,P as _,A as x,c as w,h as E,L as k}from"./shared-ba5c42c7.js";import"./shared-09acffe6.js";import{O as C}from"./shared-58fdefe5.js";import{p as S}from"./shared-bf03e2e9.js";import{a as $,y as I,x as T,z as B}from"./shared-54380337.js";import{I as M}from"./shared-930e68b7.js";import{s as V}from"./shared-53e476fd.js";import{i as D}from"./shared-0e19bda5.js";import"./shared-d53f94a0.js";import"./shared-fe73af3a.js";import"./shared-9ee4873a.js";import{h as j,P as L}from"./shared-5b1ad45f.js";import{E as Q,T as P}from"./shared-9cf7a458.js";import{L as R}from"./shared-36010fae.js";import{C as O}from"./shared-a1d07d0c.js";import{b as q}from"./shared-91fbd884.js";import"./shared-9dc6233c.js";import{a as F,F as N}from"./shared-2463790e.js";var U={raise:e,send:t,sendParent:s,sendUpdate:a,log:i,cancel:n,start:r,stop:l,assign:o,after:d,done:A,respond:u,forwardTo:h,escalate:c,choose:m,pure:p};const G=f((e=>t=>{const{element:s,name:a,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof _)s[a]!==e&&t.setValue(e);else{if(!(t instanceof x))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class W extends CustomEvent{constructor(e){super("change",{detail:e})}}class H extends CustomEvent{constructor(e){super("change",{detail:e})}}class Y extends CustomEvent{constructor(e){super("change",{detail:e})}}class K extends Y{}class J extends H{}let z,Z,X=e=>e;class ee extends($(M(k))){constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:s}=S(e);return[t.toString(),s]}},this.__getItems=v((e=>{const t=S(e).count;return[{value:"d",label:this.t("day",{count:t})},{value:"w",label:this.t("week",{count:t})},{value:"m",label:this.t("month",{count:t})},{value:"y",label:this.t("year",{count:t})}]}))}static get properties(){return g(g({},super.properties),{},{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String}})}static get styles(){return w(z||(z=X`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}render(){return E(Z||(Z=X` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,G(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}checkValidity(){return!0}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new J(this.value))}}const te=y({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"number",cond:"showsNumberField"},{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}},number:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsNumberField:e=>"number"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:U.assign({defaultCustomValue:(e,t)=>t.data}),setValue:U.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:U.assign({custom:(e,t)=>t.data}),setItems:U.assign({items:(e,t)=>t.data}),setType:U.assign({type:(e,t)=>t.data}),setMin:U.assign({min:(e,t)=>t.data}),setMax:U.assign({max:(e,t)=>t.data})}});let se,ae,ie,ne,re,le,oe,de,Ae,ue,he,ce,me,pe,ve=e=>e;const ge=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class ye extends I{constructor(){super(...arguments),this.getText=e=>e,this.__service=D(te).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-number-field":customElements.get("vaadin-number-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":ee,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,w(ie||(ie=ve`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return g(g({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,ge]:this.items,t=Array.isArray(this.value),s=this.__service.state.matches("extension.present.selected"),a=E(ne||(ne=ve` ${0} `),e.map(((e,a,i)=>{var n;const r=this.custom&&a===i.length-1,l=r?s:t?!!(null===(n=this.value)||void 0===n?void 0:n.includes(e)):e===String(this.value),o=this.disabled||!this._isI18nReady,d=V({value:r?ge:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":o,"@change":t=>{if(this.readonly)return t.preventDefault();const s=t.target.checked,a=e===ge?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===ge?s?[...i,a]:i.slice(0,i.length-1):s?[a,...i]:i.filter((e=>e!==a)):this.value=s?a:null,this.dispatchEvent(new W(this.value))}}),A=E(re||(re=ve` <div> ${0} </div> `),e===ge?this._t("choice.other").toString():E(le||(le=ve`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return E(oe||(oe=ve` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),a?"":"hidden",t?function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} transform ${s?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return E(ae||(ae=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A):function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} ${t||e?"":"shadow-xs"} transform ${s?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return E(se||(se=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A),e===ge&&s?this.__field:"",e!==ge?E(de||(de=ve`<slot name="${0}"></slot>`),e):"")})));return E(Ae||(Ae=ve`<form>${0}</form> `),a)}get __field(){const e=V({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new W(this.value))}});return"frequency"===this.type?E(ue||(ue=ve`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?E(he||(he=ve`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"number"===this.type?E(ce||(ce=ve`<vaadin-number-field ...="${0}" has-controls></vaadin-number-field>`),e):"textarea"===this.type?E(me||(me=ve`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):E(pe||(pe=ve`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}const be=j`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
|
|
1
|
+
import{aq as e,ar as t,as as s,at as a,au as i,av as n,aw as r,ax as l,o,ay as d,az as A,aA as u,aB as h,aC as c,aD as m,aE as p,m as v,_ as g,aF as y}from"./shared-8f9014ff.js";import"./shared-db623837.js";import"./shared-99c53365.js";import"./shared-0f92b865.js";import"./shared-8df8e77c.js";import{T as b}from"./shared-a0baefff.js";import"./shared-d14a664a.js";import"./shared-3eac4b7c.js";import{d as _,P as f,A as x,c as w,h as E,L as k}from"./shared-ba5c42c7.js";import"./shared-ec015a24.js";import{O as C}from"./shared-a20ef119.js";import{p as S}from"./shared-9b35fe34.js";import{a as $,y as I,x as T,z as B}from"./shared-887ac0b0.js";import{I as M}from"./shared-930e68b7.js";import{s as V}from"./shared-53e476fd.js";import{i as D}from"./shared-0e19bda5.js";import"./shared-9a3bf65c.js";import"./shared-b5e048f5.js";import"./shared-a5d6db21.js";import{h as j,P as L}from"./shared-0fd68dc0.js";import{E as Q,T as P}from"./shared-8d8975d5.js";import{L as R}from"./shared-faa174b6.js";import{C as O}from"./shared-515003f6.js";import{b as q}from"./shared-7892fd3f.js";import"./shared-b948488a.js";import{a as F,F as N}from"./shared-6cdfb858.js";var U={raise:e,send:t,sendParent:s,sendUpdate:a,log:i,cancel:n,start:r,stop:l,assign:o,after:d,done:A,respond:u,forwardTo:h,escalate:c,choose:m,pure:p};const G=_((e=>t=>{const{element:s,name:a,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof f)s[a]!==e&&t.setValue(e);else{if(!(t instanceof x))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class W extends CustomEvent{constructor(e){super("change",{detail:e})}}class H extends CustomEvent{constructor(e){super("change",{detail:e})}}class Y extends CustomEvent{constructor(e){super("change",{detail:e})}}class K extends Y{}class J extends H{}let z,Z,X=e=>e;class ee extends($(M(k))){constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:s}=S(e);return[t.toString(),s]}},this.__getItems=v((e=>{const t=S(e).count;return[{value:"d",label:this.t("day",{count:t})},{value:"w",label:this.t("week",{count:t})},{value:"m",label:this.t("month",{count:t})},{value:"y",label:this.t("year",{count:t})}]}))}static get properties(){return g(g({},super.properties),{},{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String}})}static get styles(){return w(z||(z=X`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}render(){return E(Z||(Z=X` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,G(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}checkValidity(){return!0}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new J(this.value))}}const te=y({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"number",cond:"showsNumberField"},{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}},number:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsNumberField:e=>"number"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:U.assign({defaultCustomValue:(e,t)=>t.data}),setValue:U.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:U.assign({custom:(e,t)=>t.data}),setItems:U.assign({items:(e,t)=>t.data}),setType:U.assign({type:(e,t)=>t.data}),setMin:U.assign({min:(e,t)=>t.data}),setMax:U.assign({max:(e,t)=>t.data})}});let se,ae,ie,ne,re,le,oe,de,Ae,ue,he,ce,me,pe,ve=e=>e;const ge=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class ye extends I{constructor(){super(...arguments),this.getText=e=>e,this.__service=D(te).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-number-field":customElements.get("vaadin-number-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":ee,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,w(ie||(ie=ve`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return g(g({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,ge]:this.items,t=Array.isArray(this.value),s=this.__service.state.matches("extension.present.selected"),a=E(ne||(ne=ve` ${0} `),e.map(((e,a,i)=>{var n;const r=this.custom&&a===i.length-1,l=r?s:t?!!(null===(n=this.value)||void 0===n?void 0:n.includes(e)):e===String(this.value),o=this.disabled||!this._isI18nReady,d=V({value:r?ge:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":o,"@change":t=>{if(this.readonly)return t.preventDefault();const s=t.target.checked,a=e===ge?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===ge?s?[...i,a]:i.slice(0,i.length-1):s?[a,...i]:i.filter((e=>e!==a)):this.value=s?a:null,this.dispatchEvent(new W(this.value))}}),A=E(re||(re=ve` <div> ${0} </div> `),e===ge?this._t("choice.other").toString():E(le||(le=ve`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return E(oe||(oe=ve` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),a?"":"hidden",t?function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} transform ${s?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return E(ae||(ae=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A):function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} ${t||e?"":"shadow-xs"} transform ${s?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return E(se||(se=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A),e===ge&&s?this.__field:"",e!==ge?E(de||(de=ve`<slot name="${0}"></slot>`),e):"")})));return E(Ae||(Ae=ve`<form>${0}</form> `),a)}get __field(){const e=V({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new W(this.value))}});return"frequency"===this.type?E(ue||(ue=ve`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?E(he||(he=ve`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"number"===this.type?E(ce||(ce=ve`<vaadin-number-field ...="${0}" has-controls></vaadin-number-field>`),e):"textarea"===this.type?E(me||(me=ve`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):E(pe||(pe=ve`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}const be=j`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -82,12 +82,12 @@ import{aq as e,ar as t,as as s,at as a,au as i,av as n,aw as r,ax as l,o,ay as d
|
|
|
82
82
|
Copyright (c) 2019 Vaadin Ltd.
|
|
83
83
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
84
84
|
*/
|
|
85
|
-
const
|
|
85
|
+
const _e=e=>class extends(R(e)){static get properties(){return{multiple:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_multipleChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}}}static get observers(){return["_enhanceMultipleItems(items, multiple, selected, selectedValues, selectedValues.*)"]}ready(){this.addEventListener("click",(e=>this._onMultipleClick(e))),super.ready()}_enhanceMultipleItems(e,t,s,a){if(e&&t){if(a){const t=a.map((t=>e[t]));e.forEach((e=>e.selected=-1!==t.indexOf(e)))}this._scrollToLastSelectedItem()}}_scrollToLastSelectedItem(){const e=this.selectedValues.slice(-1)[0];e&&!e.disabled&&this._scrollToItem(e)}_onMultipleClick(e){const t=this._filterItems(e.composedPath())[0],s=t&&!t.disabled?this.items.indexOf(t):-1;s<0||!this.multiple||(e.preventDefault(),-1!==this.selectedValues.indexOf(s)?this.selectedValues=this.selectedValues.filter((e=>e!==s)):this.selectedValues=this.selectedValues.concat(s))}_multipleChanged(e,t){!e&&t&&(this.selectedValues=[],this.items.forEach((e=>e.selected=!1))),e&&!t&&void 0!==this.selected&&(this.push("selectedValues",this.selected),this.selected=void 0)}}
|
|
86
86
|
/**
|
|
87
87
|
@license
|
|
88
88
|
Copyright (c) 2017 Vaadin Ltd.
|
|
89
89
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
90
|
-
*/;class
|
|
90
|
+
*/;class fe extends(Q(_e(P(L)))){static get template(){return j`
|
|
91
91
|
<style>
|
|
92
92
|
:host {
|
|
93
93
|
display: flex;
|
|
@@ -107,7 +107,7 @@ This program is available under Apache License Version 2.0, available at https:/
|
|
|
107
107
|
<div part="items">
|
|
108
108
|
<slot></slot>
|
|
109
109
|
</div>
|
|
110
|
-
`}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof L||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(
|
|
110
|
+
`}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof L||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(fe.is,fe);const xe=j`<dom-module id="lumo-select" theme-for="vaadin-select">
|
|
111
111
|
<template>
|
|
112
112
|
<style include="lumo-field-button">
|
|
113
113
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-65094878.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-9b35fe34.js";import{I as e}from"./shared-ec6a369a.js";import{m as t,_ as i}from"./shared-8f9014ff.js";import{N as r}from"./shared-2b39e4d4.js";import{i as s}from"./shared-53e42a77.js";import{c as n}from"./shared-4e709717.js";import{h as o,c as l}from"./shared-ba5c42c7.js";import{x as a}from"./shared-887ac0b0.js";let d,h,c,u,f,m=e=>e;let p,v=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=t(((e,t)=>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 ${t?".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 t;const i=this.__getItemRenderer(this.item,!!e.data),r=e=>o(d||(d=m` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)">${0}</div> `),e);if(!e.href||e.href.startsWith("foxy://"))return r(i(e));if(this.readonly)return r(i(e));const s=this.foreignKeyForUri,n=s?null===(t=this.__allLinks)||void 0===t?void 0:t.find((t=>t[s]===e.href)):void 0,l=this.disabled||!this.__allLinks||this.__isFetching;return r(o(h||(h=m` <vaadin-checkbox class="block foxy-internal-checkbox-style-0" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="transition-opacity ${0}"> ${0} </div> </vaadin-checkbox> `),l,!!n,(t=>{var i,r,s;t.currentTarget.checked?this.__insertLink(null!==(r=null===(i=e.data)||void 0===i?void 0:i._links.self.href)&&void 0!==r?r:""):this.__deleteLink(null!==(s=null==n?void 0:n._links.self.href)&&void 0!==s?s:"")}),l?"opacity-50":"opacity-100",i(e)))},this.__isFetching=!1}static get properties(){return i(i({},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,l(c||(c=m`vaadin-checkbox::part(label){margin:0 0 0 calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);align-self:center;flex:1}`))]}renderControl(){var e;let t;try{const i=new URL(null!==(e=this.optionsHref)&&void 0!==e?e:"");i.searchParams.set("limit",this.limit.toString()),t=i.toString()}catch(e){t=void 0}const i=this.__isFetching||!this.__allLinks;return o(u||(u=m` <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="text-m text-tertiary font-normal 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,i?"opacity-100":"opacity-0",this.__isFetching?"status_saving":"status_loading",!this.helperText,this.helperText,s(t),n({"block transition-colors divide-y rounded overflow-hidden":!0,"bg-contrast-5 divide-base":!0}),this.__renderItem,!this._errorMessage||this.disabled||this.readonly,this._errorMessage,this.__renderLinkResourceLoaders())}updated(e){var t,i;super.updated(e),e.has("item")&&(null===(i=(t=this.__getItemRenderer.cache).clear)||void 0===i||i.call(t))}async __insertLink(e){var t,i,s,n,o,l,a;this.__isFetching=!0;const d=new r.API(this),h=await d.fetch(null!==(t=this.linksHref)&&void 0!==t?t:"",{method:"POST",body:JSON.stringify({[null!==(i=this.foreignKeyForUri)&&void 0!==i?i:""]:e,[null!==(s=this.ownKeyForUri)&&void 0!==s?s:""]:this.ownUri})});if(h.ok){const e=await h.json(),t=await d.fetch(e._links.self.href);if(t.ok){const i=r.Rumour(null!==(o=null===(n=this.nucleon)||void 0===n?void 0:n.group)&&void 0!==o?o:""),s=await t.json();console.log({related:[null!==(l=this.linksHref)&&void 0!==l?l:""],source:e._links.self.href,data:s}),i.share({related:[null!==(a=this.linksHref)&&void 0!==a?a:""],source:e._links.self.href,data:s})}}this.__isFetching=!1}async __deleteLink(e){var t,i,s;this.__isFetching=!0;const n=new r.API(this);if((await n.fetch(e,{method:"DELETE"})).ok){r.Rumour(null!==(i=null===(t=this.nucleon)||void 0===t?void 0:t.group)&&void 0!==i?i:"").share({related:[null!==(s=this.linksHref)&&void 0!==s?s:""],source:e,data:null})}this.__isFetching=!1}__renderLinkResourceLoaders(){var e,t,i;const r=200,s=this.renderRoot.querySelector("[data-link-page]"),n=Number(null!==(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.total_items)&&void 0!==t?t:r),l=[];try{for(let e=0;e<Math.max(1,Math.ceil(n/r));e++){const t=new URL(null!==(i=this.linksHref)&&void 0!==i?i:"");t.searchParams.set("offset",String(e*r)),t.searchParams.set("limit",String(r)),l.push(t.toString())}}catch(e){}return l.map((e=>o(f||(f=m` <foxy-nucleon class="hidden" data-link-page infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e,(()=>this.requestUpdate()))))}get __allLinks(){var e,t;const i=this.embedKey;if(!i)return null;const r=this.renderRoot.querySelectorAll("[data-link-page]"),s=[];for(const n of r){const r=null===(t=null===(e=n.data)||void 0===e?void 0:e._embedded)||void 0===t?void 0:t[i];if(!r)return null;s.push(...r)}return s}});try{a("vaadin-checkbox",l(p||(p=v`:host(.foxy-internal-checkbox-style-0) label{display:flex}`)))}catch(e){}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-99c53365.js";import"./shared-f8e360e6.js";import{h as e,P as t}from"./shared-0fd68dc0.js";import{E as s,T as r}from"./shared-8d8975d5.js";import{F as l}from"./shared-6cdfb858.js";const i=e`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-required-field">
|
|
4
4
|
:host {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-5212ef4f.js";import"./shared-
|
|
1
|
+
import"./shared-5212ef4f.js";import"./shared-9b35fe34.js";import{_ as e,l as t}from"./shared-8f9014ff.js";import{C as r}from"./shared-41c9c53f.js";import{a as s,T as i,w as n}from"./shared-887ac0b0.js";import{h as l,r as o,L as h}from"./shared-ba5c42c7.js";import{I as a}from"./shared-930e68b7.js";import{N as p}from"./shared-2b39e4d4.js";import{s as u}from"./shared-791b4510.js";let c,d,_,f,v=e=>e;class y extends(r(s(i(a(h))))){constructor(){super(...arguments),this.nucleon=null}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return e(e({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,t){return"nucleon"===e&&t instanceof p?t:super.inferFromElement(e,t)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null,!1===(null===(r=this.nucleon)||void 0===r?void 0:r.in("idle"))&&(this.disabled=!0)}renderLightDom(){if("string"!=typeof this.infer)return;const e=l(c||(c=v` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);o(e,this)}updated(e){super.updated(e),this.renderLightDom()}renderControl(){return l(d||(d=v``))}render(){return this.hidden?l(_||(_=v``)):l(f||(f=v` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}function m(e){try{return JSON.parse(e)}catch(e){return null}}customElements.define("foxy-internal-control",y);class b extends y{constructor(){var e;super(...arguments),e=this,this.checkValidityAsync=null,this.jsonTemplate=null,this.jsonPath=null,this.getValue=()=>{var e;const r=t(null===(e=this.nucleon)||void 0===e?void 0:e.form,this.property);if(this.jsonPath){const e=m(r),s=m(this.jsonTemplate);return t(e,this.jsonPath,t(s,this.jsonPath))}return r},this.setValue=e=>{var t,r,s,i,n,l,o,h,a;const[p,...c]=this.property.split(".");if(c.length){const l=null!==(r=null===(t=this.nucleon)||void 0===t?void 0:t.form[p])&&void 0!==r?r:{};if(this.jsonPath){const t=null!==(i=m(null===(s=this.nucleon)||void 0===s?void 0:s.form[p]))&&void 0!==i?i:m(this.jsonTemplate);u(t,this.jsonPath,e),u(l,c,JSON.stringify(t))}else u(l,c,e);null===(n=this.nucleon)||void 0===n||n.edit({[p]:l})}else if(this.jsonPath){const t=null!==(o=m(null===(l=this.nucleon)||void 0===l?void 0:l.form[p]))&&void 0!==o?o:m(this.jsonTemplate);u(t,this.jsonPath,e),null===(h=this.nucleon)||void 0===h||h.edit({[p]:JSON.stringify(t)})}else null===(a=this.nucleon)||void 0===a||a.edit({[p]:e})},this.__debouncedCheckValidityAsync=n((async function(t){var r;const s=await(null===(r=e.checkValidityAsync)||void 0===r?void 0:r.call(e,t));e._value===t&&(e.__asyncError=!0===s?null:null!=s?s:null)}),300),this.__previousValue=null,this.__placeholder=null,this.__helperText=null,this.__asyncError=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return e(e({},super.properties),{},{checkValidityAsync:{attribute:!1},jsonTemplate:{attribute:"json-template"},placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},jsonPath:{attribute:"json-path"},getValue:{attribute:!1},setValue:{attribute:!1},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0},__asyncError:{attribute:!1}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){const t=this.__placeholder;this.__placeholder=e,this.requestUpdate("placeholder",t)}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){const t=this.__helperText;this.__helperText=e,this.requestUpdate("helperText",t)}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){const t=this.__v8nPrefix;this.__v8nPrefix=e,this.requestUpdate("v8nPrefix",t)}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){const t=this.__property;this.__property=e,this.requestUpdate("property",t)}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){const t=this.__label;this.__label=e,this.requestUpdate("label",t)}resetPlaceholder(){const e=this.__placeholder;this.__placeholder=null,this.requestUpdate("placeholder",e)}resetHelperText(){const e=this.__helperText;this.__helperText=null,this.requestUpdate("helperText",e)}resetV8nPrefix(){const e=this.__v8nPrefix;this.__v8nPrefix=null,this.requestUpdate("v8nPrefix",e)}resetProperty(){const e=this.__property;this.__property=null,this.requestUpdate("property",e)}resetLabel(){const e=this.__label;this.__label=null,this.requestUpdate("label",e)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode())}get _value(){return this.getValue()}set _value(e){this.__previousValue=this._value,this.__asyncError=null,this._error||this.__previousValue===e||this.__debouncedCheckValidityAsync(e);const t=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(t)&&this.setValue(e)}get _error(){var e,t;const r=null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)));return null!==(t=null!=r?r:this.__asyncError)&&void 0!==t?t:void 0}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",b);export{b as I,y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-99c53365.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-required-field">\n <template>\n <style>\n [part="label"] {\n align-self: flex-start;\n color: var(--lumo-secondary-text-color);\n font-weight: 500;\n font-size: var(--lumo-font-size-s);\n margin-left: calc(var(--lumo-border-radius-m) / 4);\n transition: color 0.2s;\n line-height: 1;\n padding-bottom: 0.5em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n position: relative;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n :host([has-label])::before {\n margin-top: calc(var(--lumo-font-size-s) * 1.5);\n }\n\n :host([has-label]) {\n padding-top: var(--lumo-space-m);\n }\n\n :host([required]) [part="label"] {\n padding-right: 1em;\n }\n\n [part="label"]::after {\n content: var(--lumo-required-field-indicator, "•");\n transition: opacity 0.2s;\n opacity: 0;\n color: var(--lumo-primary-text-color);\n position: absolute;\n right: 0;\n width: 1em;\n text-align: center;\n }\n\n :host([required]:not([has-value])) [part="label"]::after {\n opacity: 1;\n }\n\n :host([invalid]) [part="label"]::after {\n color: var(--lumo-error-text-color);\n }\n\n [part="error-message"] {\n margin-left: calc(var(--lumo-border-radius-m) / 4);\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n color: var(--lumo-error-text-color);\n will-change: max-height;\n transition: 0.4s max-height;\n max-height: 5em;\n }\n\n /* Margin that doesn’t reserve space when there’s no error message */\n [part="error-message"]:not(:empty)::before,\n [part="error-message"]:not(:empty)::after {\n content: "";\n display: block;\n height: 0.4em;\n }\n\n :host(:not([invalid])) [part="error-message"] {\n max-height: 0;\n overflow: hidden;\n }\n\n /* RTL specific styles */\n\n :host([dir="rtl"]) [part="label"] {\n margin-left: 0;\n margin-right: calc(var(--lumo-border-radius-m) / 4);\n }\n\n :host([required][dir="rtl"]) [part="label"] {\n padding-left: 1em;\n padding-right: 0;\n }\n\n :host([dir="rtl"]) [part="label"]::after {\n right: auto;\n left: 0;\n }\n\n :host([dir="rtl"]) [part="error-message"] {\n margin-left: 0;\n margin-right: calc(var(--lumo-border-radius-m) / 4);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-8f9014ff.js";import{h as t}from"./shared-ba5c42c7.js";import{C as l}from"./shared-41c9c53f.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-8f9014ff.js";import{h as t}from"./shared-ba5c42c7.js";import{C as l}from"./shared-41c9c53f.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-887ac0b0.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-2b39e4d4.js";let n,o,h,c,m,u=e=>e;const b=l(s(a(i(d))));class p extends b{constructor(){super(...arguments),this.columns=[]}static get properties(){return e(e({},super.properties),{},{columns:{attribute:!1}})}render(){var e,l;const s=this.columns.some((e=>!!e.header));return t(n||(n=u` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="relative font-lumo text-m"> <table class="table-fixed w-full" data-testid="table"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary text-m text-left font-medium":!0,"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===e.hideBelow,"hidden md-table-cell":"md"===e.hideBelow,"hidden lg-table-cell":"lg"===e.hideBelow,"hidden xl-table-cell":"xl"===e.hideBelow}),null===(s=e.header)||void 0===s?void 0:s.call(e,{html:t,lang:this.lang,data:this.data,ns:this.ns}))})),this.__rows.map((e=>{var l;return t(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(c||(c=u` <td class="${0}"> ${0} </td> `),r({"text-right":s===this.columns.length-1,"hidden sm-table-cell":"sm"===l.hideBelow,"hidden md-table-cell":"md"===l.hideBelow,"hidden lg-table-cell":"lg"===l.hideBelow,"hidden xl-table-cell":"xl"===l.hideBelow,"truncate h-l text-body":!0}),e?null===(a=l.cell)||void 0===a?void 0:a.call(l,{html:t,lang:this.lang,data:e,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":t(m||(m=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" class="p-m bg-base shadow-xs rounded-t-l rounded-b-l" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),this.in("busy")?"busy":this.in("idle")?"empty":"error",this.lang,this.ns,null!==(l=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==l?l:""),this.renderTemplateOrSlot())}get __rows(){var e,t,l;const s=Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{}).reduce(((e,t)=>[...e,...t]),[]);let a;if(0===s.length)try{const e=new URL(null!==(l=this.href)&&void 0!==l?l:"").searchParams.get("limit"),t=parseInt(null!=e?e:"");a=isNaN(t)?20:t}catch(e){a=20}else a=s.length;return new Array(a).fill(null).map(((e,t)=>{var l;return null!==(l=s[t])&&void 0!==l?l:e}))}}export{p as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as r,h as s}from"./shared-ba5c42c7.js";import{z as e}from"./shared-
|
|
1
|
+
import{L as r,h as s}from"./shared-ba5c42c7.js";import{z as e}from"./shared-887ac0b0.js";let t,o=r=>r;class a extends r{static get styles(){return e.styles}render(){return s(t||(t=o` <p class="flex text-s border border-contrast-10 rounded p-s text-body leading-s"> <iron-icon icon="lumo:error" class="text-error flex-shrink-0 mr-s"></iron-icon> <slot></slot> </p> `))}}export{a as W};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as t}from"./shared-
|
|
1
|
+
import{F as t}from"./shared-6cdfb858.js";import{b as e}from"./shared-8d8975d5.js";import{D as s,t as i}from"./shared-0fd68dc0.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 Vaadin Ltd.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-8df8e77c.js";import"./shared-a0baefff.js";import{I as e}from"./shared-ec6a369a.js";import{_ as t}from"./shared-8f9014ff.js";import{c as i,h as s}from"./shared-ba5c42c7.js";import{i as r}from"./shared-53e42a77.js";import{c as a}from"./shared-4e709717.js";let l,n,o,d,u,h,p,m=e=>e;customElements.define("foxy-internal-number-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.step=null,this.min=null,this.max=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},step:{type:Number},min:{type:Number},max:{type:Number},__isErrorVisible:{attribute:!1}})}static get styles(){return[...super.styles,i(l||(l=m`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){var e,t,i;return"summary-item"===this.layout?this.__renderSummaryItemLayout():s(n||(n=m` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" step="${0}" min="${0}" max="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-number-field> `),r(this._errorMessage),this.placeholder,this.helperText,this.label,r(null!==(e=this.step)&&void 0!==e?e:void 0),r(null!==(t=this.min)&&void 0!==t?t:void 0),r(null!==(i=this.max)&&void 0!==i?i: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=parseFloat(t.value)}),this.prefix?s(o||(o=m`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?s(d||(d=m`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}__renderSummaryItemLayout(){var e,t,i;return s(u||(u=m` <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> ${0} <input placeholder="${0}" style="min-width:10ch" class="${0}" type="number" step="${0}" min="${0}" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} </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.prefix?s(h||(h=m`<div>${0}</div>`),this.prefix):"",this.placeholder,a({"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}),null!==(e=this.step)&&void 0!==e?e:"any",r(null!==(t=this.min)&&void 0!==t?t:void 0),r(null!==(i=this.max)&&void 0!==i?i:void 0),this._value,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)||(this._value=t)}),this.suffix?s(p||(p=m`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage)}});
|
|
@@ -568,9 +568,9 @@
|
|
|
568
568
|
"placeholder": "Optional"
|
|
569
569
|
}
|
|
570
570
|
},
|
|
571
|
-
"
|
|
571
|
+
"subscription": {
|
|
572
572
|
"label": "Subscription",
|
|
573
|
-
"helper_text": "
|
|
573
|
+
"helper_text": "",
|
|
574
574
|
"subscription-frequency": {
|
|
575
575
|
"label": "Frequency",
|
|
576
576
|
"helper_text": "",
|
|
@@ -597,6 +597,49 @@
|
|
|
597
597
|
"placeholder": "None"
|
|
598
598
|
}
|
|
599
599
|
},
|
|
600
|
+
"downloadable-purchase": {
|
|
601
|
+
"label": "Downloadable usage",
|
|
602
|
+
"helper_text": "",
|
|
603
|
+
"no_stats_text": "This item has not been downloaded yet. Download statistics will appear here once the item has been downloaded by a customer.",
|
|
604
|
+
"number-of-downloads": {
|
|
605
|
+
"label": "Number of downloads"
|
|
606
|
+
},
|
|
607
|
+
"first-download-time": {
|
|
608
|
+
"label": "First download",
|
|
609
|
+
"value": "{{ value, date }} at {{ value, time }}"
|
|
610
|
+
},
|
|
611
|
+
"download-link": {
|
|
612
|
+
"label": "Download file"
|
|
613
|
+
},
|
|
614
|
+
"copy-download-link": {
|
|
615
|
+
"failed_to_copy": "Failed to copy",
|
|
616
|
+
"click_to_copy": "Copy URL",
|
|
617
|
+
"copying": "Copying...",
|
|
618
|
+
"done": "Copied to clipboard"
|
|
619
|
+
},
|
|
620
|
+
"reset-usage": {
|
|
621
|
+
"message_idle": "This action will attempt to reset usage for this downloadable purchase. Would you like to proceed?",
|
|
622
|
+
"message_fail": "Failed to reset usage for this downloadable purchase. If you'd like to retry, close this dialog and click the reset usage button again.",
|
|
623
|
+
"message_done": "Usage for this downloadable purchase was reset successfully. You can close this dialog now.",
|
|
624
|
+
"button_close": "Close",
|
|
625
|
+
"button_confirm": "Reset usage",
|
|
626
|
+
"button_cancel": "Go back",
|
|
627
|
+
"loading_busy": "Processing",
|
|
628
|
+
"header": "Reset usage",
|
|
629
|
+
"button": "Reset usage"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
"actions": {
|
|
633
|
+
"download": {
|
|
634
|
+
"label": "Download file"
|
|
635
|
+
},
|
|
636
|
+
"copy-download-link": {
|
|
637
|
+
"failed_to_copy": "Failed to copy",
|
|
638
|
+
"click_to_copy": "Copy download link",
|
|
639
|
+
"copying": "Copying...",
|
|
640
|
+
"done": "Copied to clipboard"
|
|
641
|
+
}
|
|
642
|
+
},
|
|
600
643
|
"dimensions": {
|
|
601
644
|
"label": "Dimensions",
|
|
602
645
|
"helper_text": "",
|
|
@@ -625,13 +668,13 @@
|
|
|
625
668
|
"label": "Meta",
|
|
626
669
|
"helper_text": "",
|
|
627
670
|
"url": {
|
|
628
|
-
"label": "URL",
|
|
629
|
-
"helper_text": "
|
|
671
|
+
"label": "Website URL",
|
|
672
|
+
"helper_text": "",
|
|
630
673
|
"placeholder": "None"
|
|
631
674
|
},
|
|
632
675
|
"image": {
|
|
633
|
-
"label": "Image",
|
|
634
|
-
"helper_text": "
|
|
676
|
+
"label": "Image URL",
|
|
677
|
+
"helper_text": "",
|
|
635
678
|
"placeholder": "None"
|
|
636
679
|
},
|
|
637
680
|
"quantity-max": {
|
|
@@ -645,8 +688,8 @@
|
|
|
645
688
|
"placeholder": "1"
|
|
646
689
|
},
|
|
647
690
|
"expires": {
|
|
648
|
-
"label": "
|
|
649
|
-
"helper_text": "
|
|
691
|
+
"label": "Expiry Date",
|
|
692
|
+
"helper_text": "",
|
|
650
693
|
"display_value": "{{ value, date }}",
|
|
651
694
|
"placeholder": "Optional"
|
|
652
695
|
}
|
|
@@ -678,6 +721,9 @@
|
|
|
678
721
|
},
|
|
679
722
|
"discount-details": {
|
|
680
723
|
"label": "Applied discounts",
|
|
724
|
+
"helper_text": "",
|
|
725
|
+
"total_items": "{{ count }} discount",
|
|
726
|
+
"total_items_plural": "{{ count }} discounts",
|
|
681
727
|
"pagination": {
|
|
682
728
|
"first": "First",
|
|
683
729
|
"last": "Last",
|
|
@@ -698,6 +744,9 @@
|
|
|
698
744
|
},
|
|
699
745
|
"coupon-details": {
|
|
700
746
|
"label": "Applied coupons",
|
|
747
|
+
"helper_text": "",
|
|
748
|
+
"total_items": "{{ count }} coupon",
|
|
749
|
+
"total_items_plural": "{{ count }} coupons",
|
|
701
750
|
"pagination": {
|
|
702
751
|
"first": "First",
|
|
703
752
|
"last": "Last",
|
|
@@ -718,6 +767,9 @@
|
|
|
718
767
|
},
|
|
719
768
|
"attributes": {
|
|
720
769
|
"label": "Attributes",
|
|
770
|
+
"helper_text": "",
|
|
771
|
+
"total_items": "{{ count }} attribute",
|
|
772
|
+
"total_items_plural": "{{ count }} attributes",
|
|
721
773
|
"delete_header": "Remove attribute?",
|
|
722
774
|
"delete_message": "Please confirm that you'd like to remove this attribute from the item.",
|
|
723
775
|
"delete_confirm": "Remove",
|
|
@@ -821,6 +873,9 @@
|
|
|
821
873
|
},
|
|
822
874
|
"item-options": {
|
|
823
875
|
"label": "Item options",
|
|
876
|
+
"helper_text": "",
|
|
877
|
+
"total_items": "{{ count }} option",
|
|
878
|
+
"total_items_plural": "{{ count }} options",
|
|
824
879
|
"delete_header": "Remove item option?",
|
|
825
880
|
"delete_message": "Please confirm that you'd like to remove this item option from the item.",
|
|
826
881
|
"delete_confirm": "Remove",
|
|
@@ -2166,4 +2221,4 @@
|
|
|
2166
2221
|
"loading_busy": "Loading",
|
|
2167
2222
|
"loading_error": "Unknown error"
|
|
2168
2223
|
}
|
|
2169
|
-
}
|
|
2224
|
+
}
|
|
@@ -715,9 +715,9 @@
|
|
|
715
715
|
"placeholder": "Optional"
|
|
716
716
|
}
|
|
717
717
|
},
|
|
718
|
-
"
|
|
718
|
+
"subscription": {
|
|
719
719
|
"label": "Subscription",
|
|
720
|
-
"helper_text": "
|
|
720
|
+
"helper_text": "",
|
|
721
721
|
"subscription-frequency": {
|
|
722
722
|
"label": "Frequency",
|
|
723
723
|
"helper_text": "",
|
|
@@ -744,6 +744,49 @@
|
|
|
744
744
|
"placeholder": "None"
|
|
745
745
|
}
|
|
746
746
|
},
|
|
747
|
+
"downloadable-purchase": {
|
|
748
|
+
"label": "Downloadable usage",
|
|
749
|
+
"helper_text": "",
|
|
750
|
+
"no_stats_text": "This item has not been downloaded yet. Download statistics will appear here once the item has been downloaded by a customer.",
|
|
751
|
+
"number-of-downloads": {
|
|
752
|
+
"label": "Number of downloads"
|
|
753
|
+
},
|
|
754
|
+
"first-download-time": {
|
|
755
|
+
"label": "First download",
|
|
756
|
+
"value": "{{ value, date }} at {{ value, time }}"
|
|
757
|
+
},
|
|
758
|
+
"download-link": {
|
|
759
|
+
"label": "Download file"
|
|
760
|
+
},
|
|
761
|
+
"copy-download-link": {
|
|
762
|
+
"failed_to_copy": "Failed to copy",
|
|
763
|
+
"click_to_copy": "Copy URL",
|
|
764
|
+
"copying": "Copying...",
|
|
765
|
+
"done": "Copied to clipboard"
|
|
766
|
+
},
|
|
767
|
+
"reset-usage": {
|
|
768
|
+
"message_idle": "This action will attempt to reset usage for this downloadable purchase. Would you like to proceed?",
|
|
769
|
+
"message_fail": "Failed to reset usage for this downloadable purchase. If you'd like to retry, close this dialog and click the reset usage button again.",
|
|
770
|
+
"message_done": "Usage for this downloadable purchase was reset successfully. You can close this dialog now.",
|
|
771
|
+
"button_close": "Close",
|
|
772
|
+
"button_confirm": "Reset usage",
|
|
773
|
+
"button_cancel": "Go back",
|
|
774
|
+
"loading_busy": "Processing",
|
|
775
|
+
"header": "Reset usage",
|
|
776
|
+
"button": "Reset usage"
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
"actions": {
|
|
780
|
+
"download": {
|
|
781
|
+
"label": "Download file"
|
|
782
|
+
},
|
|
783
|
+
"copy-download-link": {
|
|
784
|
+
"failed_to_copy": "Failed to copy",
|
|
785
|
+
"click_to_copy": "Copy download link",
|
|
786
|
+
"copying": "Copying...",
|
|
787
|
+
"done": "Copied to clipboard"
|
|
788
|
+
}
|
|
789
|
+
},
|
|
747
790
|
"dimensions": {
|
|
748
791
|
"label": "Dimensions",
|
|
749
792
|
"helper_text": "",
|
|
@@ -772,13 +815,13 @@
|
|
|
772
815
|
"label": "Meta",
|
|
773
816
|
"helper_text": "",
|
|
774
817
|
"url": {
|
|
775
|
-
"label": "URL",
|
|
776
|
-
"helper_text": "
|
|
818
|
+
"label": "Website URL",
|
|
819
|
+
"helper_text": "",
|
|
777
820
|
"placeholder": "None"
|
|
778
821
|
},
|
|
779
822
|
"image": {
|
|
780
|
-
"label": "Image",
|
|
781
|
-
"helper_text": "
|
|
823
|
+
"label": "Image URL",
|
|
824
|
+
"helper_text": "",
|
|
782
825
|
"placeholder": "None"
|
|
783
826
|
},
|
|
784
827
|
"quantity-max": {
|
|
@@ -792,8 +835,8 @@
|
|
|
792
835
|
"placeholder": "1"
|
|
793
836
|
},
|
|
794
837
|
"expires": {
|
|
795
|
-
"label": "
|
|
796
|
-
"helper_text": "
|
|
838
|
+
"label": "Expiry Date",
|
|
839
|
+
"helper_text": "",
|
|
797
840
|
"display_value": "{{ value, date }}",
|
|
798
841
|
"placeholder": "Optional"
|
|
799
842
|
}
|
|
@@ -825,6 +868,9 @@
|
|
|
825
868
|
},
|
|
826
869
|
"discount-details": {
|
|
827
870
|
"label": "Applied discounts",
|
|
871
|
+
"helper_text": "",
|
|
872
|
+
"total_items": "{{ count }} discount",
|
|
873
|
+
"total_items_plural": "{{ count }} discounts",
|
|
828
874
|
"pagination": {
|
|
829
875
|
"first": "First",
|
|
830
876
|
"last": "Last",
|
|
@@ -845,6 +891,9 @@
|
|
|
845
891
|
},
|
|
846
892
|
"coupon-details": {
|
|
847
893
|
"label": "Applied coupons",
|
|
894
|
+
"helper_text": "",
|
|
895
|
+
"total_items": "{{ count }} coupon",
|
|
896
|
+
"total_items_plural": "{{ count }} coupons",
|
|
848
897
|
"pagination": {
|
|
849
898
|
"first": "First",
|
|
850
899
|
"last": "Last",
|
|
@@ -865,6 +914,9 @@
|
|
|
865
914
|
},
|
|
866
915
|
"attributes": {
|
|
867
916
|
"label": "Attributes",
|
|
917
|
+
"helper_text": "",
|
|
918
|
+
"total_items": "{{ count }} attribute",
|
|
919
|
+
"total_items_plural": "{{ count }} attributes",
|
|
868
920
|
"delete_header": "Remove attribute?",
|
|
869
921
|
"delete_message": "Please confirm that you'd like to remove this attribute from the item.",
|
|
870
922
|
"delete_confirm": "Remove",
|
|
@@ -968,6 +1020,9 @@
|
|
|
968
1020
|
},
|
|
969
1021
|
"item-options": {
|
|
970
1022
|
"label": "Item options",
|
|
1023
|
+
"helper_text": "",
|
|
1024
|
+
"total_items": "{{ count }} option",
|
|
1025
|
+
"total_items_plural": "{{ count }} options",
|
|
971
1026
|
"delete_header": "Remove item option?",
|
|
972
1027
|
"delete_message": "Please confirm that you'd like to remove this item option from the item.",
|
|
973
1028
|
"delete_confirm": "Remove",
|
|
@@ -1436,4 +1491,4 @@
|
|
|
1436
1491
|
"loading_busy": "Loading",
|
|
1437
1492
|
"loading_error": "Unknown error"
|
|
1438
1493
|
}
|
|
1439
|
-
}
|
|
1494
|
+
}
|