@foxy.io/elements 1.34.0-beta.1 → 1.34.0-beta.3
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-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-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 +3 -3
- 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 +2 -2
- 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 +1 -1
- 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-f4e03cdc.js → shared-0293eba8.js} +1 -1
- package/dist/cdn/shared-0d0fe9c0.js +1 -0
- package/dist/cdn/{shared-433ff5ae.js → shared-0db6454a.js} +10 -4
- package/dist/cdn/shared-0fe1dd67.js +1 -0
- package/dist/cdn/{shared-ff10b9fb.js → shared-126cb82b.js} +1 -1
- package/dist/cdn/{shared-3db18172.js → shared-16766722.js} +1 -1
- package/dist/cdn/{shared-f6f4bed5.js → shared-1838736d.js} +1 -1
- package/dist/cdn/{shared-9f4fad24.js → shared-1b5f155f.js} +1 -1
- package/dist/cdn/{shared-95a591b3.js → shared-1df36027.js} +2 -2
- package/dist/cdn/{shared-d3ffbcb0.js → shared-23aa2506.js} +1 -1
- package/dist/cdn/{shared-a9f4e92e.js → shared-2b6b735d.js} +1 -1
- package/dist/cdn/{shared-705ce87a.js → shared-2ddb119e.js} +1 -1
- package/dist/cdn/{shared-69cdc370.js → shared-2fd6e530.js} +1 -1
- package/dist/cdn/{shared-6b15ed9e.js → shared-370be17b.js} +5 -5
- package/dist/cdn/{shared-a8f38962.js → shared-3e25035f.js} +1 -1
- package/dist/cdn/{shared-62af0ef5.js → shared-3efc6649.js} +1 -1
- package/dist/cdn/shared-41072bad.js +1 -0
- package/dist/cdn/{shared-cc8ce493.js → shared-46de2ed2.js} +1 -1
- package/dist/cdn/{shared-4f33425a.js → shared-4e6c65e6.js} +1 -1
- package/dist/cdn/{shared-7edf38e9.js → shared-4f216dc1.js} +1 -1
- package/dist/cdn/{shared-83c8a2d2.js → shared-51fd3fc6.js} +1 -1
- package/dist/cdn/{shared-32566c11.js → shared-5245b330.js} +1 -1
- package/dist/cdn/{shared-8d826ccb.js → shared-527eb17e.js} +1 -1
- package/dist/cdn/{shared-a46c8030.js → shared-6a63a308.js} +1 -1
- package/dist/cdn/{shared-636cf673.js → shared-6c4a5133.js} +1 -1
- package/dist/cdn/{shared-25b83adb.js → shared-6cf0c762.js} +1 -1
- package/dist/cdn/{shared-8d5b9662.js → shared-6cf39826.js} +5 -5
- package/dist/cdn/shared-7040eef3.js +1 -0
- package/dist/cdn/{shared-47fe9f56.js → shared-74d9b3d4.js} +1 -1
- package/dist/cdn/{shared-136942c7.js → shared-7cfd461d.js} +1 -1
- package/dist/cdn/{shared-3ef5dcef.js → shared-7d234de2.js} +1 -1
- package/dist/cdn/{shared-a9b8c3ab.js → shared-7e1768cf.js} +1 -1
- package/dist/cdn/{shared-f0db16a5.js → shared-851b96ae.js} +1 -1
- package/dist/cdn/{shared-cb24170b.js → shared-85803aca.js} +1 -1
- package/dist/cdn/shared-869ed25d.js +294 -0
- package/dist/cdn/{shared-67d1de9a.js → shared-88bfb7f5.js} +1 -1
- package/dist/cdn/{shared-77135874.js → shared-8e73014c.js} +1 -1
- package/dist/cdn/{shared-3ebbd21d.js → shared-921e3f1e.js} +1 -1
- package/dist/cdn/{shared-52c9fa57.js → shared-9421c0d7.js} +1 -1
- package/dist/cdn/{shared-b8ae5af7.js → shared-9c479921.js} +1 -1
- package/dist/cdn/{shared-148214ee.js → shared-9e9bec09.js} +1 -1
- package/dist/cdn/{shared-6583e3f9.js → shared-a24264e6.js} +1 -1
- package/dist/cdn/{shared-9dd252c7.js → shared-a34983ea.js} +2 -2
- package/dist/cdn/{shared-a2616e4b.js → shared-a4953186.js} +1 -1
- package/dist/cdn/{shared-1d0d814b.js → shared-a7524277.js} +1 -1
- package/dist/cdn/shared-a83e33cd.js +1 -0
- package/dist/cdn/{shared-46189aae.js → shared-a86480c5.js} +1 -1
- package/dist/cdn/{shared-0d4cdb19.js → shared-ae68261f.js} +1 -1
- package/dist/cdn/{shared-2ca888f6.js → shared-b62fb09f.js} +1 -1
- package/dist/cdn/{shared-5cdec81e.js → shared-bbd2a4e6.js} +1 -1
- package/dist/cdn/{shared-56ee26d7.js → shared-bec65d6d.js} +1 -1
- package/dist/cdn/{shared-02c737dc.js → shared-c176c4fa.js} +1 -1
- package/dist/cdn/{shared-f79438f8.js → shared-c1f4a6ef.js} +1 -1
- package/dist/cdn/{shared-cfe76d01.js → shared-d735fc99.js} +1 -1
- package/dist/cdn/{shared-69c7aec1.js → shared-d806ec21.js} +1 -1
- package/dist/cdn/{shared-08e73812.js → shared-dbc9aff0.js} +1 -1
- package/dist/cdn/{shared-a1f697c2.js → shared-e0b00e0f.js} +1 -1
- package/dist/cdn/{shared-66e2a4ee.js → shared-e6379bd1.js} +1 -1
- package/dist/cdn/{shared-33c9ef32.js → shared-e7069b0f.js} +1 -1
- package/dist/cdn/{shared-70612035.js → shared-e766f6e0.js} +1 -1
- package/dist/cdn/{shared-57373d84.js → shared-e8df4368.js} +1 -1
- package/dist/cdn/{shared-b8c6eafc.js → shared-e9e2fd3f.js} +1 -1
- package/dist/cdn/{shared-2dd2ff95.js → shared-f378fe25.js} +1 -1
- package/dist/cdn/{shared-6b578d1a.js → shared-f57e1679.js} +1 -1
- package/dist/cdn/{shared-6b5e4fe4.js → shared-f8252d03.js} +1 -1
- package/dist/cdn/{shared-2aee2a22.js → shared-fceaef95.js} +1 -1
- package/dist/cdn/translations/template-config-form/en.json +520 -108
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +2 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +23 -2
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.d.ts +1 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +12 -2
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -1
- package/dist/elements/internal/InternalSwitchControl/InternalSwitchControl.d.ts +4 -0
- package/dist/elements/internal/InternalSwitchControl/InternalSwitchControl.js +20 -0
- package/dist/elements/internal/InternalSwitchControl/InternalSwitchControl.js.map +1 -1
- package/dist/elements/public/SignInForm/SignInForm.d.ts +3 -0
- package/dist/elements/public/SignInForm/SignInForm.js +22 -0
- package/dist/elements/public/SignInForm/SignInForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +33 -26
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +679 -1234
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/index.d.ts +9 -5
- package/dist/elements/public/TemplateConfigForm/index.js +9 -5
- package/dist/elements/public/TemplateConfigForm/index.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControl.d.ts +14 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControl.js +138 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControl.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/{CountryCard.d.ts → internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControlItem.d.ts} +4 -4
- package/dist/elements/public/TemplateConfigForm/{CountryCard.js → internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControlItem.js} +20 -28
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControlItem.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/index.d.ts +4 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/index.js +8 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/index.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormSupportedCardsControl/InternalTemplateConfigFormSupportedCardsControl.d.ts +7 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormSupportedCardsControl/InternalTemplateConfigFormSupportedCardsControl.js +82 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormSupportedCardsControl/InternalTemplateConfigFormSupportedCardsControl.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormSupportedCardsControl/index.d.ts +3 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormSupportedCardsControl/index.js +5 -0
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormSupportedCardsControl/index.js.map +1 -0
- package/dist/elements/public/WebhookForm/WebhookForm.js +2 -0
- package/dist/elements/public/WebhookForm/WebhookForm.js.map +1 -1
- package/dist/mixins/themeable.js +4 -12
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-1acbd965.js +0 -1
- package/dist/cdn/shared-61ade33e.js +0 -6
- package/dist/cdn/shared-684174e7.js +0 -1
- package/dist/cdn/shared-8a65adfd.js +0 -1
- package/dist/cdn/shared-9ea762dc.js +0 -294
- package/dist/cdn/shared-b73aaedb.js +0 -1
- package/dist/cdn/shared-ccc7a886.js +0 -1
- package/dist/cdn/shared-e8744e04.js +0 -1
- package/dist/cdn/shared-eb8a9f27.js +0 -1
- package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +0 -21
- package/dist/elements/public/TemplateConfigForm/CountriesList.js +0 -137
- package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +0 -1
- package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +0 -1
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import{ap as e,aq as t,ar as s,as as a,at as i,au as n,av as r,aw as l,o,ax as d,ay as A,az as u,aA as h,aB as c,aC as m,aD as p,m as v,_ as g,aE as y}from"./shared-d1195c27.js";import{a as b,F as _}from"./shared-f57e1679.js";import"./shared-126cb82b.js";import"./shared-e0b00e0f.js";import"./shared-7d234de2.js";import{T as f}from"./shared-46de2ed2.js";import"./shared-1838736d.js";import"./shared-921e3f1e.js";import{d as x,P as w,A as E,c as k,h as C,L as S}from"./shared-dc73b9a5.js";import"./shared-4f216dc1.js";import"./shared-c1f4a6ef.js";import{p as $}from"./shared-ae68261f.js";import{a as I,y as T,x as B,z as M}from"./shared-e766f6e0.js";import{I as V}from"./shared-17a61265.js";import{s as D}from"./shared-99940888.js";import{i as j}from"./shared-fcdb896f.js";import"./shared-6cf0c762.js";import"./shared-0293eba8.js";import"./shared-527eb17e.js";import{h as L,P as Q}from"./shared-a24264e6.js";import{E as P,T as R}from"./shared-dbc9aff0.js";import{L as O}from"./shared-23aa2506.js";import{C as q}from"./shared-0db6454a.js";import{I as F}from"./shared-7e1768cf.js";import"./shared-bbd2a4e6.js";import{O as N}from"./shared-51fd3fc6.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=x((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 w)s[a]!==e&&t.setValue(e);else{if(!(t instanceof E))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(I(V(S))){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}=$(e);return[t.toString(),s]}},this.__getItems=v((e=>{const t=$(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 k(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 C(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 T{constructor(){super(...arguments),this.getText=e=>e,this.__service=j(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,k(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=C(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=D({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=C(re||(re=ve` <div> ${0} </div> `),e===ge?this._t("choice.other").toString():C(le||(le=ve`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return C(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 C(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 C(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?C(de||(de=ve`<slot name="${0}"></slot>`),e):"")})));return C(Ae||(Ae=ve`<form>${0}</form> `),a)}get __field(){const e=D({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?C(ue||(ue=ve`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?C(he||(he=ve`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"number"===this.type?C(ce||(ce=ve`<vaadin-number-field ...="${0}" has-controls></vaadin-number-field>`),e):"textarea"===this.type?C(me||(me=ve`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):C(pe||(pe=ve`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}const be=L`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
|
|
2
|
+
<template>
|
|
3
|
+
<style>
|
|
4
|
+
:host {
|
|
5
|
+
-webkit-tap-highlight-color: transparent;
|
|
6
|
+
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* IE11 flexbox issue workaround (vaadin-items are flex containers with min-height) */
|
|
10
|
+
[part="items"] {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[part="items"] ::slotted(*) {
|
|
16
|
+
flex: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Normal item */
|
|
20
|
+
|
|
21
|
+
[part="items"] ::slotted(vaadin-item) {
|
|
22
|
+
-webkit-tap-highlight-color: var(--lumo-primary-color-10pct);
|
|
23
|
+
cursor: default;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
[part="items"] ::slotted(vaadin-item) {
|
|
27
|
+
outline: none;
|
|
28
|
+
border-radius: var(--lumo-border-radius);
|
|
29
|
+
padding-left: var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius) / 4));
|
|
30
|
+
padding-right: calc(var(--lumo-space-l) + var(--lumo-border-radius) / 4);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Workaround to display checkmark in IE11 when list-box is not used in dropdown-menu */
|
|
34
|
+
[part="items"] ::slotted(vaadin-item)::before {
|
|
35
|
+
display: var(--_lumo-item-selected-icon-display);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Hovered item */
|
|
39
|
+
/* TODO a workaround until we have "focus-follows-mouse". After that, use the hover style for focus-ring as well */
|
|
40
|
+
|
|
41
|
+
[part="items"] ::slotted(vaadin-item:hover:not([disabled])) {
|
|
42
|
+
background-color: var(--lumo-primary-color-10pct);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Focused item */
|
|
46
|
+
|
|
47
|
+
[part="items"] ::slotted([focus-ring]:not([disabled])) {
|
|
48
|
+
box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (pointer: coarse) {
|
|
52
|
+
[part="items"] ::slotted(vaadin-item:hover:not([disabled])) {
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[part="items"] ::slotted([focus-ring]:not([disabled])) {
|
|
57
|
+
box-shadow: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Easily add section dividers */
|
|
62
|
+
|
|
63
|
+
[part="items"] ::slotted(hr) {
|
|
64
|
+
height: 1px;
|
|
65
|
+
border: 0;
|
|
66
|
+
padding: 0;
|
|
67
|
+
margin: var(--lumo-space-s) var(--lumo-border-radius);
|
|
68
|
+
background-color: var(--lumo-contrast-10pct);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* RTL specific styles */
|
|
72
|
+
|
|
73
|
+
:host([dir="rtl"]) [part="items"] ::slotted(vaadin-item) {
|
|
74
|
+
padding-left: calc(var(--lumo-space-l) + var(--lumo-border-radius) / 4);
|
|
75
|
+
padding-right: var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius) / 4));
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
78
|
+
</template>
|
|
79
|
+
</dom-module>`;document.head.appendChild(be.content);
|
|
80
|
+
/**
|
|
81
|
+
@license
|
|
82
|
+
Copyright (c) 2019 Vaadin Ltd.
|
|
83
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
84
|
+
*/
|
|
85
|
+
const _e=e=>class extends(O(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
|
+
/**
|
|
87
|
+
@license
|
|
88
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
89
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
90
|
+
*/;class fe extends(P(_e(R(Q)))){static get template(){return L`
|
|
91
|
+
<style>
|
|
92
|
+
:host {
|
|
93
|
+
display: flex;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([hidden]) {
|
|
97
|
+
display: none !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[part="items"] {
|
|
101
|
+
height: 100%;
|
|
102
|
+
width: 100%;
|
|
103
|
+
overflow-y: auto;
|
|
104
|
+
-webkit-overflow-scrolling: touch;
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
107
|
+
<div part="items">
|
|
108
|
+
<slot></slot>
|
|
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 Q||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(fe.is,fe);const xe=L`<dom-module id="lumo-select" theme-for="vaadin-select">
|
|
111
|
+
<template>
|
|
112
|
+
<style include="lumo-field-button">
|
|
113
|
+
:host {
|
|
114
|
+
outline: none;
|
|
115
|
+
-webkit-tap-highlight-color: transparent;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[selected] {
|
|
119
|
+
padding-left: 0;
|
|
120
|
+
padding-right: 0;
|
|
121
|
+
flex: auto;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:host([theme~="small"]) [selected] {
|
|
125
|
+
padding: 0;
|
|
126
|
+
min-height: var(--lumo-size-s);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:host([theme~="align-left"]) [selected] {
|
|
130
|
+
text-align: left;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
:host([theme~="align-right"]) [selected] {
|
|
134
|
+
text-align: right;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:host([theme~="align-center"]) [selected] {
|
|
138
|
+
text-align: center;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
[part="toggle-button"]::before {
|
|
142
|
+
content: var(--lumo-icons-dropdown);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Highlight the toggle button when hovering over the entire component */
|
|
146
|
+
:host(:hover:not([readonly]):not([disabled])) [part="toggle-button"] {
|
|
147
|
+
color: var(--lumo-contrast-80pct);
|
|
148
|
+
}
|
|
149
|
+
</style>
|
|
150
|
+
</template>
|
|
151
|
+
</dom-module><dom-module id="lumo-select-text-field" theme-for="vaadin-select-text-field">
|
|
152
|
+
<template>
|
|
153
|
+
<style>
|
|
154
|
+
:host([theme~="align-center"]) ::slotted([part~="value"]) {
|
|
155
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:host([theme~="align-center"]) ::slotted([part~="value"]) {
|
|
159
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([theme~="align-right"]) ::slotted([part~="value"]) {
|
|
163
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
[part="input-field"] {
|
|
167
|
+
cursor: default;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
[part="input-field"] ::slotted([part="value"]) {
|
|
171
|
+
display: flex;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* ShadyCSS limitation workaround */
|
|
175
|
+
[part="input-field"] ::slotted([part="value"]) [selected]::before {
|
|
176
|
+
display: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
[part="input-field"]:focus {
|
|
180
|
+
outline: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* RTL specific styles */
|
|
184
|
+
|
|
185
|
+
:host([theme~="align-left"][dir="rtl"]) ::slotted([part~="value"]) {
|
|
186
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:host([theme~="align-center"][dir="rtl"]) ::slotted([part~="value"]) {
|
|
190
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:host([dir="rtl"]) ::slotted([part~="value"]),
|
|
194
|
+
:host([theme~="align-right"][dir="rtl"]) ::slotted([part~="value"]) {
|
|
195
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
196
|
+
}
|
|
197
|
+
</style>
|
|
198
|
+
</template>
|
|
199
|
+
</dom-module><dom-module id="lumo-select-overlay" theme-for="vaadin-select-overlay">
|
|
200
|
+
<template>
|
|
201
|
+
<style include="lumo-menu-overlay">
|
|
202
|
+
:host {
|
|
203
|
+
--_lumo-item-selected-icon-display: block;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[part~="overlay"] {
|
|
207
|
+
min-width: var(--vaadin-select-text-field-width);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Small viewport adjustment */
|
|
211
|
+
:host([phone]) {
|
|
212
|
+
top: 0 !important;
|
|
213
|
+
right: 0 !important;
|
|
214
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
215
|
+
left: 0 !important;
|
|
216
|
+
align-items: stretch;
|
|
217
|
+
justify-content: flex-end;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:host([theme~="align-left"]) {
|
|
221
|
+
text-align: left;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
:host([theme~="align-right"]) {
|
|
225
|
+
text-align: right;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:host([theme~="align-center"]) {
|
|
229
|
+
text-align: center;
|
|
230
|
+
}
|
|
231
|
+
</style>
|
|
232
|
+
</template>
|
|
233
|
+
</dom-module>`;document.head.appendChild(xe.content);
|
|
234
|
+
/**
|
|
235
|
+
@license
|
|
236
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
237
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
238
|
+
*/
|
|
239
|
+
const we=document.createElement("template");we.innerHTML='<dom-module id="vaadin-select-overlay-styles" theme-for="vaadin-select-overlay">\n <template>\n <style>\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n\n :host([bottom-aligned]) {\n justify-content: flex-end;\n }\n\n :host([right-aligned]) {\n align-items: flex-end;\n }\n\n :host([dir="rtl"]) {\n align-items: flex-end;\n }\n\n :host([dir="rtl"][right-aligned]) {\n align-items: flex-start;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(we.content);class Ee extends N{static get is(){return"vaadin-select-overlay"}}
|
|
240
|
+
/**
|
|
241
|
+
@license
|
|
242
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
243
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
244
|
+
*/
|
|
245
|
+
let ke;customElements.define(Ee.is,Ee);class Ce extends f{static get is(){return"vaadin-select-text-field"}static get template(){if(super.template.content.querySelector('slot[name="input"]'))return super.template;if(!ke){ke=super.template.cloneNode(!0);const e=document.createElement("slot");e.setAttribute("name","value");const t=ke.content.querySelector("input");t.parentElement.replaceChild(e,t),e.appendChild(t)}return ke}get focusElement(){return this.shadowRoot.querySelector("[part=input-field]")}get inputElement(){return this.shadowRoot.querySelector("input")}}customElements.define(Ce.is,Ce);
|
|
246
|
+
/**
|
|
247
|
+
@license
|
|
248
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
249
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
250
|
+
*/
|
|
251
|
+
const Se=document.createElement("template");Se.innerHTML="<custom-style>\n <style>\n @font-face {\n font-family: \"vaadin-select-icons\";\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAASEAAsAAAAABDgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIGKmNtYXAAAAFoAAAAVAAAAFQXVtKHZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAHwAAAB8CohkJ2hlYWQAAAJAAAAANgAAADYOavgEaGhlYQAAAngAAAAkAAAAJAarA8ZobXR4AAACnAAAABQAAAAUCAABP2xvY2EAAAKwAAAADAAAAAwAKABSbWF4cAAAArwAAAAgAAAAIAAHABduYW1lAAAC3AAAAYYAAAGGmUoJ+3Bvc3QAAARkAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QADwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkA//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQE/AUAC6QIVABQAAAEwFx4BFxYxMDc+ATc2MTAjKgEjIgE/ISJPIiEhIk8iIUNCoEJDAhUhIk8iISEiTyIhAAEAAAABAABvL5bdXw889QALBAAAAAAA1jHaeQAAAADWMdp5AAAAAALpAhUAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAukAAQAAAAAAAAAAAAAAAAAAAAUEAAAAAAAAAAAAAAAAAAAABAABPwAAAAAACgAUAB4APgABAAAABQAVAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEABwAAAAEAAAAAAAIABwBgAAEAAAAAAAMABwA2AAEAAAAAAAQABwB1AAEAAAAAAAUACwAVAAEAAAAAAAYABwBLAAEAAAAAAAoAGgCKAAMAAQQJAAEADgAHAAMAAQQJAAIADgBnAAMAAQQJAAMADgA9AAMAAQQJAAQADgB8AAMAAQQJAAUAFgAgAAMAAQQJAAYADgBSAAMAAQQJAAoANACkaWNvbW9vbgBpAGMAbwBtAG8AbwBuVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwaWNvbW9vbgBpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuUmVndWxhcgBSAGUAZwB1AGwAYQByaWNvbW9vbgBpAGMAbwBtAG8AbwBuRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n </style>\n</custom-style>",document.head.appendChild(Se.content);class $e extends(P(q(R(b(F,Q))))){static get template(){return L`
|
|
252
|
+
<style>
|
|
253
|
+
:host {
|
|
254
|
+
display: inline-block;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
vaadin-select-text-field {
|
|
258
|
+
width: 100%;
|
|
259
|
+
min-width: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host([hidden]) {
|
|
263
|
+
display: none !important;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
[part="toggle-button"] {
|
|
267
|
+
font-family: "vaadin-select-icons";
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
[part="toggle-button"]::before {
|
|
271
|
+
content: "\\e900";
|
|
272
|
+
}
|
|
273
|
+
</style>
|
|
274
|
+
|
|
275
|
+
<vaadin-select-text-field placeholder="[[placeholder]]" label="[[label]]" required="[[required]]" invalid="[[invalid]]" error-message="[[errorMessage]]" readonly\$="[[readonly]]" helper-text="[[helperText]]" theme\$="[[theme]]">
|
|
276
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
277
|
+
<slot name="helper" slot="helper">[[helperText]]</slot>
|
|
278
|
+
<div part="value"></div>
|
|
279
|
+
<div part="toggle-button" slot="suffix" role="button" aria-haspopup="listbox" aria-label="Toggle"></div>
|
|
280
|
+
</vaadin-select-text-field>
|
|
281
|
+
<vaadin-select-overlay opened="{{opened}}" with-backdrop="[[_phone]]" phone\$="[[_phone]]" theme\$="[[theme]]"></vaadin-select-overlay>
|
|
282
|
+
|
|
283
|
+
<iron-media-query query="[[_phoneMediaQuery]]" query-matches="{{_phone}}"></iron-media-query>
|
|
284
|
+
`}static get is(){return"vaadin-select"}static get version(){return"2.5.0"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:Function,errorMessage:{type:String,value:""},label:{type:String},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},required:{type:Boolean,reflectToAttribute:!0,observer:"_requiredChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_overlayElement:Object,_inputElement:Object,_toggleElement:Object,_items:Object,_contentTemplate:Object,_oldTemplate:Object,_oldRenderer:Object}}static get observers(){return["_updateSelectedItem(value, _items)","_updateAriaExpanded(opened, _toggleElement, _inputElement)","_templateOrRendererChanged(_contentTemplate, renderer, _overlayElement)"]}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-select-overlay"),this._valueElement=this.shadowRoot.querySelector('[part="value"]'),this._toggleElement=this.shadowRoot.querySelector('[part="toggle-button"]'),this._nativeInput=this.focusElement.shadowRoot.querySelector("input"),this._nativeInput.setAttribute("aria-hidden",!0),this._nativeInput.setAttribute("tabindex",-1),this._nativeInput.style.pointerEvents="none",this.focusElement.addEventListener("click",(e=>{const t=Array.from(e.composedPath()).some((e=>e.nodeType===Node.ELEMENT_NODE&&"helper"===e.getAttribute("slot")));this.opened=!this.readonly&&!t})),this.focusElement.addEventListener("keydown",(e=>this._onKeyDown(e))),this._observer=new _(this,(e=>this._setTemplateFromNodes(e.addedNodes))),this._observer.flush()}_setTemplateFromNodes(e){const t=Array.from(e).filter((e=>e.localName&&"template"===e.localName))[0]||this._contentTemplate;this._overlayElement.template=this._contentTemplate=t,this._setForwardHostProps()}_setForwardHostProps(){if(this._overlayElement.content){const e=this._overlayElement._instance&&this._overlayElement._instance.forwardHostProp;this._overlayElement._instance&&(this._overlayElement._instance.forwardHostProp=(...t)=>{e.apply(this._overlayElement._instance,t),setTimeout((()=>{this._updateValueSlot()}))},this._assignMenuElement())}}render(){this._overlayElement&&(this._overlayElement.render(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_removeNewRendererOrTemplate(e,t,s,a){e!==t?this._contentTemplate=void 0:s!==a&&(this.renderer=void 0)}_templateOrRendererChanged(e,t,s){if(s){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for select content");this._oldTemplate=e,this._oldRenderer=t,t&&(s.setProperties({owner:this,renderer:t}),this.render(),s.content.firstChild&&this._assignMenuElement())}}_assignMenuElement(){this._menuElement=Array.from(this._overlayElement.content.children).filter((e=>"style"!==e.localName))[0],this._menuElement&&(this._menuElement.addEventListener("items-changed",(e=>{this._items=this._menuElement.items,this._items.forEach((e=>e.setAttribute("role","option")))})),this._menuElement.addEventListener("selected-changed",(e=>this._updateValueSlot())),this._menuElement.addEventListener("keydown",(e=>this._onKeyDownInside(e))),this._menuElement.addEventListener("click",(e=>{this.__userInteraction=!0,this.opened=!1}),!0),this._menuElement.setAttribute("role","listbox"))}get focusElement(){return this._inputElement||(this._inputElement=this.shadowRoot.querySelector("vaadin-select-text-field"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_requiredChanged(e){this.setAttribute("aria-required",e)}_valueChanged(e,t){""===e?this.focusElement.removeAttribute("has-value"):this.focusElement.setAttribute("has-value",""),""===e&&void 0===t||this.validate()}_onKeyDown(e){if(!this.readonly&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/.test(e.key))e.preventDefault(),this.opened=!0;else if(/[a-zA-Z0-9]/.test(e.key)&&1===e.key.length){const t=this._menuElement.selected,s=void 0!==t?t:-1,a=this._menuElement._searchKey(s,e.key);a>=0&&(this.__userInteraction=!0,this._updateSelectedItem(this._items[a].value,this._items))}}_onKeyDownInside(e){/^(Tab)$/.test(e.key)&&(this.opened=!1)}_openedChanged(e,t){if(e){if(!this._overlayElement||!this._menuElement||!this._toggleElement||!this.focusElement||this.disabled||this.readonly)return void(this.opened=!1);this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement.hasAttribute("focus-ring"),this._menuElement.focus(),this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0)}else t&&(this.focusElement.focus(),this._openedWithFocusRing&&this.focusElement.setAttribute("focus-ring",""),this.validate(),window.removeEventListener("scroll",this._boundSetPosition,!0))}_hasContent(e){return!!e&&Boolean(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()||e.children.length)}_attachSelectedItem(e){if(!e)return;let t;e.hasAttribute("label")?(t=document.createElement("vaadin-item"),t.textContent=e.getAttribute("label")):t=e.cloneNode(!0),t._sourceItem=e,t.removeAttribute("tabindex"),t.removeAttribute("role"),this._valueElement.appendChild(t),t.selected=!0}_updateAriaExpanded(e,t,s){t&&t.setAttribute("aria-expanded",e),s&&s.focusElement&&s.focusElement.setAttribute("aria-expanded",e)}_updateValueSlot(){this.opened=!1,this._valueElement.innerHTML="";const e=this._items[this._menuElement.selected],t=this._hasContent(e),s=this._inputElement.shadowRoot.querySelector('slot[name="input"]')?"input":"value";this._valueElement.slot=t?s:"",t&&window.ShadyDOM&&window.ShadyDOM.flush(),this._attachSelectedItem(e),!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__userInteraction&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__userInteraction=!1),delete this._selectedChanging)}_updateSelectedItem(e,t){t&&(this._menuElement.selected=t.reduce(((t,s,a)=>void 0===t&&s.value===e?a:t),void 0),this._selectedChanging||(this._valueChanging=!0,this._updateValueSlot(),delete this._valueChanging))}_setFocused(e){super._setFocused(this.opened||e),this.focusElement._setFocused(this.hasAttribute("focused")),!this.hasAttribute("focused")&&this.validate()}_setPosition(){const e=this._inputElement.shadowRoot.querySelector('[part~="input-field"]').getBoundingClientRect(),t=Math.min(window.innerWidth,document.documentElement.clientWidth),s=Math.min(window.innerHeight,document.documentElement.clientHeight),a=this.__shouldAlignRight(e,t),i=this.__shouldAlignBottom(e,s);a?(this._overlayElement.setAttribute("right-aligned",""),this._overlayElement.style.right=t-e.right+"px",this._overlayElement.style.removeProperty("left")):(this._overlayElement.removeAttribute("right-aligned"),this._overlayElement.style.left=e.left+"px",this._overlayElement.style.removeProperty("right")),i?(this._overlayElement.setAttribute("bottom-aligned",""),this._overlayElement.style.removeProperty("top"),this._overlayElement.style.bottom=s-e.bottom+"px"):(this._overlayElement.removeAttribute("bottom-aligned"),this._overlayElement.style.removeProperty("bottom"),this._overlayElement.style.top=e.top+"px"),this._overlayElement.updateStyles({"--vaadin-select-text-field-width":e.width+"px"})}__shouldAlignRight(e,t){const s="rtl"===this.getAttribute("dir"),a=e.left/t,i=(t-e.right)/t;return s?a>.3:i<.3}__shouldAlignBottom(e,t){return e.top>(t-e.height)/2}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}validate(){const e=!(!this.disabled&&this.required&&!this.value);return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}}customElements.define($e.is,$e);let Ie,Te,Be=e=>e;B("vaadin-list-box",k(Ie||(Ie=Be`
|
|
285
|
+
[part='items'] ::slotted(vaadin-item.dropdown-divisor){
|
|
286
|
+
color:var(--lumo-contrast-40pct);
|
|
287
|
+
box-shadow:0 1px var(--lumo-contrast-10pct);
|
|
288
|
+
border-radius:0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
[part='items'] ::slotted(vaadin-item.dropdown-sub-item){
|
|
292
|
+
margin-left:var(--lumo-space-l);
|
|
293
|
+
}
|
|
294
|
+
`)));class Me extends S{constructor(){super(),this.disabled=!1,this.label="",this.value=null,this.items=null,this.getText=e=>e,this.__unexistentValue=`@foxy.io/elements#dropdown-${Math.random().toFixed(16).substr(2)}`,this.__renderedItems={},this.__list=document.createElement("vaadin-list-box")}static get properties(){return g(g({},super.properties),{},{disabled:{type:Boolean},getText:{type:Object,attribute:!1},items:{type:Array},label:{type:String},value:{type:String}})}static get styles(){return M.styles}render(){return C(Te||(Te=Be` <vaadin-select class="w-full ${0}" data-testid="select" .label="${0}" .value="${0}" .disabled="${0}" .renderer="${0}" @change="${0}"> </vaadin-select> `),this.label?"-mt-m":"",this.label,null===this.value?this.__unexistentValue:this.value,this.disabled,this.__renderItems.bind(this),this.__handleChange)}__renderItems(e){var t;let s=e.querySelector("vaadin-list-box");null===s&&(e.appendChild(this.__list),s=this.__list);for(const e of Object.values(this.__renderedItems))e.dataset.keep="";const a=null!==(t=this.items)&&void 0!==t?t:[];for(let e=0;e<a.length;++e)if("string"==typeof a[e])this.__addOrKeepItem(a[e],a[e],s).classList.add("dropdown-item");else if(Array.isArray(a[e])){const t=this.__addOrKeepItem(a[e][0],a[e][0],s);t.classList.add("dropdown-item","dropdown-divisor"),t.disabled=!0;for(const t of a[e][1])this.__addOrKeepItem(a[e][0]+": "+t,t,s).classList.add("dropdown-sub-item")}for(const e of Object.values(this.__renderedItems)){const t=e;t.dataset.keep||(e.remove(),delete this.__renderedItems[t.dataset.trackId])}}__addOrKeepItem(e,t,s){let a;return this.__renderedItems[e]?a=this.__renderedItems[e]:(a=document.createElement("vaadin-item"),this.__renderedItems[e]=a,a.value=e,s.appendChild(a)),a.dataset.keep="true",a.dataset.trackId=e,a.textContent=this.getText(t),a}__handleChange(e){const t=e.target.value,s=t===this.__unexistentValue?null:t;this.dispatchEvent(new H(s))}}let Ve,De,je=e=>e;class Le extends S{constructor(){super(...arguments),this.variant=null}static get styles(){return[M.styles,k(Ve||(Ve=je`@keyframes blink{from{opacity:.5}to{opacity:1}}.animated{animation:blink .5s infinite alternate}:host{display:inline-block;min-width:4rem}`))]}static get properties(){return g(g({},super.properties),{},{variant:{type:String}})}render(){const e="error"===this.variant?"bg-error-10":"bg-contrast-10",t=null===this.variant?"animated":"";return C(De||(De=je` <div class="relative"> <span class="opacity-0"><slot></slot></span> <div class="${0} ${0} rounded my-xs absolute inset-0"></div> </div> `),e,t)}}let Qe,Pe,Re,Oe=e=>e;class qe extends T{constructor(){super(...arguments),this.key=""}static get scopedElements(){return{"x-skeleton":Le}}static get properties(){return g(g({},super.properties),{},{key:{type:String,reflect:!0},opts:{type:Object}})}static get styles(){return[super.styles,k(Qe||(Qe=Oe`:host{display:inline-block;color:inherit;line-height:inherit;font:inherit}`))]}get whenReady(){return this._whenI18nReady.then((()=>this.updateComplete))}render(){return this._isI18nReady?C(Pe||(Pe=Oe`${0}<slot></slot>`),this._t(this.key,this.opts)):C(Re||(Re=Oe`<x-skeleton class="block">${0}<slot></slot></x-skeleton>`),this.key)}}function Fe(...e){return e.filter((e=>!!e))}let Ne,Ue,Ge,We,He=e=>e;class Ye extends T{constructor(){super(...arguments),this.disabled=!1,this.value=[]}static get scopedElements(){return{"x-i18n":qe}}static get properties(){return g(g({},super.properties),{},{disabled:{type:Boolean},value:{type:Array}})}render(){const e=Ye._allDays.map((e=>{try{return e.toLocaleString(this.lang,{minimumIntegerDigits:2})}catch(t){return e.toString()}}));return C(Ne||(Ne=He` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs" style="max-width:364px;font-feature-settings:'tnum' 1"> ${0} </div> ${0} </div> `),Ye._allDays.map(((t,s)=>C(Ue||(Ue=He` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(t),e[s],this.disabled,this.value.includes(t),(e=>this._handleChange(e,t))))),Fe(this.value.length>0&&C(Ge||(Ge=He` <p class="text-s text-tertiary leading-s"> <x-i18n key="monthday-picker.hint" .opts="${0}" .lang="${0}"> </x-i18n> ${0} </p> `),{days:this.value},this.lang,Fe([29,30,31].some((e=>this.value.includes(e)))&&C(We||(We=He`<x-i18n key="monthday-picker.warning" .lang="${0}"></x-i18n>`),this.lang)))))}_getLabelClass(e){let t="flex items-center justify-center m-xs p-s rounded text-m font-medium transition duration-200 sm-p-0 sm-h-m sm-w-l ";return this.value.includes(e)||(t+="bg-contrast-5 "),this._isI18nReady&&!this.disabled?(t+="cursor-pointer ",t+=this.value.includes(e)?"text-base ":"hover-bg-primary-10 ",e<29?(t+="focus-within-shadow-outline ",t+=this.value.includes(e)?"bg-primary":"text-body"):(t+="focus-within-shadow-outline-error ",t+=this.value.includes(e)?"bg-error":"text-error")):(t+="text-transparent ",this.value.includes(e)&&(t+=e<29?"bg-primary-50":"bg-error-10")),t}_handleChange(e,t){e.stopPropagation(),this._toggle(t),this._sendChange()}_sendChange(){this.dispatchEvent(new Y(this.value))}_toggle(e){const t=this.value.indexOf(e);this.value=-1===t?[...this.value,e]:this.value.filter(((e,s)=>s!==t))}}function Ke(e,t,s="long"){const a=new Date;for(;a.getDay()!==e;)a.setDate(a.getDate()+1);return a.toLocaleDateString(t,{weekday:s})}Ye._allDays=Array.from(new Array(31),((e,t)=>t+1));let Je,ze,Ze,Xe=e=>e;class et extends Ye{render(){return C(Je||(Je=Xe` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs text-m uppercase"> ${0} </div> ${0} </div> `),et._allDays.map((e=>C(ze||(ze=Xe` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(e),Ke(e,this.lang,"short"),this.disabled||!this._isI18nReady,this.value.includes(e),(t=>this._handleChange(t,e))))),Fe(this.value.length>0&&C(Ze||(Ze=Xe` <p class="text-s text-tertiary leading-s"> <x-i18n key="weekday-picker.hint" .lang="${0}" .opts="${0}"> </x-i18n> </p> `),this.lang,{days:this.value})))}_getLabelClass(e){let t="flex items-center justify-center m-xs h-m w-xl rounded font-medium transition duration-200 ";return this._isI18nReady&&!this.disabled?(t+="cursor-pointer focus-within-shadow-outline ",t+=this.value.includes(e)?"text-base bg-primary":"bg-contrast-5 hover-bg-contrast-10 text-body"):(t+="text-transparent ",t+=this.value.includes(e)?"bg-primary-50":"bg-contrast-5"),t}_sendChange(){this.dispatchEvent(new K(this.value))}}et._allDays=new Array(7).fill(0).map(((e,t)=>t));export{ye as C,H as D,qe as I,Ye as M,Le as S,et as W,$e as a,Me as b,W as c,Fe as d,U as e,Ke as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e}from"./shared-0fe1dd67.js";import"./shared-ae68261f.js";import{c as s,h as t}from"./shared-dc73b9a5.js";let r,d,l=e=>e;customElements.define("foxy-internal-summary-control",class extends e{static get styles(){return[...super.styles,s(r||(r=l`::slotted(*){background-color:var(--lumo-contrast-5pct);padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)}`))]}renderLightDom(){}renderControl(){return t(d||(d=l` <div class="leading-s mb-s" ?hidden="${0}"> <p class="font-medium text-body text-l" ?hidden="${0}">${0}</p> <p class="text-s text-secondary" ?hidden="${0}">${0}</p> </div> <div class="rounded overflow-hidden grid" style="gap:1px"> <slot></slot> </div> `),!this.label&&!this.helperText,!this.label,this.label,!this.helperText,this.helperText)}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-126cb82b.js";import{h as e,G as t,P as r}from"./shared-a24264e6.js";import{E as o,T as i,D as s}from"./shared-dbc9aff0.js";import{C as a}from"./shared-0db6454a.js";import"./shared-16766722.js";import{F as l}from"./shared-f57e1679.js";import{a as n}from"./shared-0fe1dd67.js";import"./shared-ae68261f.js";import{_ as d}from"./shared-d1195c27.js";import{i as h}from"./shared-9803aa7c.js";import{c,h as u}from"./shared-dc73b9a5.js";import{c as p}from"./shared-4e709717.js";import{x as b}from"./shared-e766f6e0.js";const m=e`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-126cb82b.js";import{h as e,P as t}from"./shared-a24264e6.js";import{a}from"./shared-46de2ed2.js";import{C as i}from"./shared-0db6454a.js";import{E as r,T as l}from"./shared-dbc9aff0.js";const o=e`<dom-module id="lumo-text-area" theme-for="vaadin-text-area">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-text-field">
|
|
4
4
|
[part="input-field"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-126cb82b.js";import{h as e,G as t,P as o}from"./shared-a24264e6.js";import{E as i,T as r}from"./shared-dbc9aff0.js";import{C as a}from"./shared-0db6454a.js";const s=e`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-checkbox-style lumo-checkbox-effects">
|
|
4
4
|
/* IE11 only */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-c1f4a6ef.js";import{a as e}from"./shared-0fe1dd67.js";import"./shared-ae68261f.js";import{_ as t}from"./shared-d1195c27.js";import{i as s}from"./shared-9803aa7c.js";import{h as i,s as a}from"./shared-dc73b9a5.js";import{c as l}from"./shared-4e709717.js";let r,o,d,h,n=e=>e;customElements.define("foxy-internal-select-control",class extends e{constructor(){super(...arguments),this.options=[],this.layout=null,this.theme=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{options:{type:Array},layout:{},theme:{type:String},__isErrorVisible:{attribute:!1}})}renderControl(){var e;return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(r||(r=n` <vaadin-combo-box item-value-path="value" item-label-path="label" error-message="${0}" item-id-path="value" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .items="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this.options.map((e=>({label:"label"in e?this.t(e.label):e.rawLabel,value:e.value}))),this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,t.validate()}))}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}updated(e){super.updated(e);const t=this.renderRoot.querySelector("vaadin-combo-box");t&&t.value!==this._value&&(t.value=this._value)}__renderSummaryItemLayout(){const e=this.options.find((e=>e.value===this._value));return i(o||(o=n` <div class="flex items-start leading-xs"> <div class="flex-1"> <label class="text-m text-body" for="select">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="${0}"> <div class="flex items-center gap-xs"> <div> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @blur="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} </select> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,l({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),e?"label"in e?this.t(e.label):e.rawLabel:this.placeholder,this.readonly?"":a(d||(d=n`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),l({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),!e,this.placeholder,this.options.map((t=>i(h||(h=n` <option value="${0}" ?selected="${0}"> ${0} </option> `),t.value,e&&t.value===this._value,"label"in t?this.t(t.label):t.rawLabel))))}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-
|
|
1
|
+
import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-e766f6e0.js";
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-126cb82b.js";import{h as t,P as e}from"./shared-a24264e6.js";import{F as i,t as o}from"./shared-f57e1679.js";import{T as n,a,E as r}from"./shared-dbc9aff0.js";import"./shared-9c479921.js";import{O as s}from"./shared-51fd3fc6.js";import"./shared-0db6454a.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-ae68261f.js";import{a as l}from"./shared-0fe1dd67.js";import"./shared-a86480c5.js";import{x as d}from"./shared-e766f6e0.js";import{c,h,r as m}from"./shared-dc73b9a5.js";import{_ as u}from"./shared-d1195c27.js";import{i as p}from"./shared-9803aa7c.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:host {
|
|
@@ -277,4 +277,4 @@ class v extends(n(r(e))){static get template(){return t`
|
|
|
277
277
|
</style>
|
|
278
278
|
<vaadin-notification-card id="vaadin-notification-card" theme\$="[[theme]]">
|
|
279
279
|
</vaadin-notification-card>
|
|
280
|
-
`}static get is(){return"vaadin-notification"}static get version(){return"1.6.2"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function,_notificationTemplate:Object}}static get observers(){return["_durationChanged(duration, opened)","_templateOrRendererChanged(_notificationTemplate, renderer, opened)"]}ready(){super.ready(),this._observer=new i(this,(t=>{this._setTemplateFromNodes(t.addedNodes)}))}_setTemplateFromNodes(t){this._notificationTemplate=t.filter((t=>t.localName&&"template"===t.localName))[0]||this._notificationTemplate}render(){"function"==typeof this.renderer&&this.renderer(this._card,this)}_removeNewRendererOrTemplate(t,e,i,o){t!==e?this._notificationTemplate=void 0:i!==o&&(this.renderer=void 0)}_templateOrRendererChanged(t,e,i){if(t&&e)throw this._removeNewRendererOrTemplate(t,this._oldTemplate,e,this._oldRenderer),new Error("You should only use either a renderer or a template for notification content");this._oldTemplate=t;const o=this._oldRenderer!==e;if(this._oldRenderer=e,e){if(this._card=this.$["vaadin-notification-card"],o)for(;this._card.firstChild;)this._card.removeChild(this._card.firstChild);i&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.render())}}open(){this.opened=!0}close(){this.opened=!1}get _container(){return y._container||(y._container=document.createElement("vaadin-notification-container"),document.body.appendChild(y._container)),y._container}_openedChanged(t){t?(this._container.opened=!0,this._instance||this.renderer||this._ensureTemplatized(),this._animatedAppendNotificationCard(),setTimeout((()=>this._updateShadyButtonStyles()))):this._card&&this._closeNotificationCard()}_ensureTemplatized(){if(this._notificationTemplate=this.querySelector("template")||this._notificationTemplate,!this._notificationTemplate)return;this._notificationTemplate._Templatizer||(this._notificationTemplate._Templatizer=o(this._notificationTemplate,this,{forwardHostProp:function(t,e){this._instance&&this._instance.forwardHostProp(t,e)}})),this._instance=new this._notificationTemplate._Templatizer({});const t=this._notificationTemplate.getRootNode(),e=t!==document;if(this._card=this.$["vaadin-notification-card"],this._cardContent=this._card.shadowRoot.querySelector('[part~="content"]'),e){if(this._cardContent.shadowRoot||this._cardContent.attachShadow({mode:"open"}),window.ShadyCSS&&!window.ShadyCSS.nativeShadow){var i=t.host&&t.host.localName;i&&-1===i.indexOf("-")&&(i=t.host.getAttribute("is")),i&&this._cardContent.setAttribute("is",i)}else{const e=Array.from(t.querySelectorAll("style")).reduce(((t,e)=>t+e.textContent),"").replace(/:host/g,":host-nomatch");if(e){const t=document.createElement("style");t.textContent=e,this._cardContent.shadowRoot.appendChild(t)}}this._cardContent.shadowRoot.appendChild(this._instance.root)}else this._card.appendChild(this._instance.root);this._card.setAttribute("aria-label",this._card.textContent.trim())}_animatedAppendNotificationCard(){if(this._card){this._card.setAttribute("opening",""),this._appendNotificationCard();const t=()=>{this._card.removeEventListener("animationend",t),this._card.removeAttribute("opening")};this._card.addEventListener("animationend",t),this._didAnimateNotificationAppend=!0}else this._didAnimateNotificationAppend=!1}_appendNotificationCard(){this._card&&(this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)?(this._card.slot=this.position,this._container.firstElementChild&&/top/.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)):window.console.warn(`Invalid alignment parameter provided: position=${this.position}`))}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=Boolean(this._container.firstElementChild)}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");if(t&&"none"!=t){const t=()=>{this._removeNotificationCard(),this._card.removeEventListener("animationend",t)};this._card.addEventListener("animationend",t)}else this._removeNotificationCard()}_positionChanged(t){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout((()=>this.close()),t)))}_updateShadyButtonStyles(){window.ShadyCSS&&!this.__buttonStylesPending&&(customElements.whenDefined("vaadin-button").then((()=>{Array.from(this._card.querySelectorAll("*")).filter((t=>t instanceof customElements.get("vaadin-button"))).forEach((t=>{const e=["--_lumo-button-color","--_lumo-button-background-color","--_lumo-button-primary-color","--_lumo-button-primary-background-color"].reduce(((t,e)=>{const i=window.ShadyCSS.getComputedStyleValue(this._card,e);return i&&(t[e]=i),t}),{});t.updateStyles(e)})),this.__buttonStylesPending=!1})),this.__buttonStylesPending=!0)}}customElements.define(v.is,v),customElements.define(g.is,g),customElements.define(y.is,y);let b;d("vaadin-checkbox",c(b||(b=(t=>t)`:host([data-async-list-control]) label{display:flex}:host([data-async-list-control]) [part=label]{width:100%;margin:0!important}`)));let x,$=t=>t;const C=t=>class e extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1}}}static get observers(){return["__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign,\n noHorizontalOverlap, noVerticalOverlap)"]}constructor(){super();const t=this._updatePosition.bind(this);this.addEventListener("opened-changed",(e=>{const i=e.detail.value?"addEventListener":"removeEventListener";window[i]("scroll",t),window[i]("resize",t),e.detail.value&&this._updatePosition()}))}ready(){super.ready(),console.warn("PositionMixin is not considered stable and might change any time")}__positionSettingsChanged(){this._updatePosition()}_updatePosition(){if(!this.positionTarget)return;const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)})));const e="rtl"===t.direction,i=this.positionTarget.getBoundingClientRect(),o=this.__calculateHorizontalPosition(i,e),n=this.__calculateVerticalPosition(i),a=Object.assign({},o,n);this.__doSetPosition(a,e)}__calculateHorizontalPosition(t,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const n=Math.min(window.innerWidth,document.documentElement.clientWidth),a=!i&&"start"===this.horizontalAlign||i&&"end"===this.horizontalAlign,r=!!this.style.left;return e.__calculatePositionInOneDimension(t,o,n,this.__margins,a,r,this.noHorizontalOverlap,{start:"left",end:"right"})}__calculateVerticalPosition(t){const i=Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),n="top"===this.verticalAlign,a=!!this.style.top;return e.__calculatePositionInOneDimension(t,i,o,this.__margins,n,a,this.noVerticalOverlap,{start:"top",end:"bottom"})}static __calculatePositionInOneDimension(t,e,i,o,n,a,r,s){const l=i-t[r?s.end:s.start]-o[s.end],d=t[r?s.start:s.end]-o[s.start],c=n?l:d,h=n===(c>(n?d:l)||c>e),m=h?s.start:s.end,u=h?s.end:s.start,p=(h?t[r?s.end:s.start]:i-t[r?s.start:s.end])+"px",_={};return _[m]=p,_[u]="",_}__doSetPosition(t,e){Object.assign(this.style,t);const i=!e&&t.left||e&&t.right;this.style.alignItems=i?"flex-start":"flex-end",this.style.justifyContent=t.top?"flex-start":"flex-end"}};class w extends(C(s)){constructor(){super(...arguments),this.renderer=(t,e,i)=>{var o;const n=null!==(o=t.firstElementChild)&&void 0!==o?o:document.createElement("div");t.firstElementChild||t.appendChild(n);const a=i,r=h(x||(x=$` <div style="display:grid;gap:var(--lumo-space-m);padding:var(--lumo-space-s);width:22rem"> <foxy-query-builder lang="${0}" ns="${0}" .options="${0}" .value="${0}"> </foxy-query-builder> <div style="display:flex;justify-content:space-between"> <vaadin-button theme="primary" style="margin:0" @click="${0}"> <foxy-i18n lang="${0}" ns="${0}" key="search"></foxy-i18n> </vaadin-button> <vaadin-button theme="secondary contrast" style="margin:0" @click="${0}"> <foxy-i18n lang="${0}" ns="${0}" key="clear"></foxy-i18n> </vaadin-button> </div> </div> `),a.lang,`${a.ns} query-builder`.trim(),a.options,a.value,(()=>{var t;const e=null!==(t=n.querySelector("foxy-query-builder").value)&&void 0!==t?t:"";this.dispatchEvent(new CustomEvent("search",{detail:e}))}),a.lang,a.ns,(()=>this.dispatchEvent(new CustomEvent("search"))),a.lang,a.ns);m(r,n)}}static get is(){return"foxy-internal-async-list-control-filter-overlay"}}let k,S,P,T,A,E,O,R,j,N,B,z,H,D,I,L,V,q=t=>t;customElements.define("foxy-internal-async-list-control",class extends l{constructor(){super(...arguments),this.keepDialogOpenOnDelete=!1,this.keepDialogOpenOnPost=!1,this.createPageHref=null,this.bulkActions=[],this.related=[],this.actions=[],this.filters=[],this.limit=20,this.first=null,this.form=null,this.formProps={},this.item=null,this.itemProps={},this.wide=!1,this.alert=!1,this.hideDeleteButton=!1,this.hideCreateButton=!1,this.getPageHref=null,this.__deletionConfimationCallback=null,this.__cachedCardRenderer=null,this.__activeBulkAction=null,this.__isFilterVisible=!1,this.__notification=null,this.__isSelecting=!1,this.__selection=[],this.__itemRenderer=t=>{var e;if(!t.data)return this.__cardRenderer(t);if(this.__isSelecting)return h(k||(k=q` <vaadin-checkbox class="block w-full" style="padding-left:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" data-async-list-control ?disabled="${0}" ?checked="${0}" @change="${0}"> ${0} </vaadin-checkbox> `),this.disabled||!!this.__activeBulkAction,this.__selection.find((e=>e._links.self.href===t.data._links.self.href)),(e=>{e.currentTarget.checked?this.__selection=[...this.__selection,t.data]:this.__selection=this.__selection.filter((e=>e._links.self.href!==t.data._links.self.href))}),this.__cardRenderer(t));if("string"!=typeof(null===(e=this.getPageHref)||void 0===e?void 0:e.call(this,t.href,t.data))&&!this.form)return this.__cardRenderer(t);const i=this.disabledSelector.matches("card",!0),o=this.__cardRenderer(t);let n;const a=_({"rounded-t":!t.previous,"rounded-b":!t.next,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block transition-colors":!0,"hover-bg-contrast-5":!i});if(this.getPageHref)if(i)n=h(S||(S=q`<div class="${0}">${0}</div>`),a,o);else{const e=this.getPageHref(t.href,t.data);n=h(P||(P=q`<a class="${0}" href="${0}">${0}</a>`),a,e,o)}else{n=h(T||(T=q` <button ?disabled="${0}" class="${0}" @click="${0}">${0}</button> `),i,a,(e=>{const i=new CustomEvent("itemclick",{cancelable:!0,composed:!0,bubbles:!0,detail:t.href});if(this.dispatchEvent(i)){const i=e.currentTarget,o=this.__dialog;o.header="header_update",o.href=t.href,o.show(i)}}),o)}return this.hideDeleteButton&&!this.actions.length||this.readonly?n:h(A||(A=q` <foxy-swipe-actions class="block"> ${0} ${0} ${0} </foxy-swipe-actions> `),n,this.actions.map((e=>h(E||(E=q` <vaadin-button data-testclass="action" theme="${0}" class="h-full rounded-none relative" slot="action" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" infer="" key="${0}"> </foxy-i18n> <div class="${0}"> <foxy-spinner layout="no-label" infer="spinner" state="${0}"> </foxy-spinner> </div> </vaadin-button> `),e.theme,this.disabled,(()=>e.onClick(t.data)),_({"transition-opacity":!0,"opacity-0":"idle"!==e.state}),e.text,_({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===e.state}),e.state))),this.hideDeleteButton?"":h(O||(O=q` <vaadin-button theme="primary error" class="h-full rounded-none" slot="action" @click="${0}"> <foxy-i18n infer="" key="delete_button_text"></foxy-i18n> </vaadin-button> `),(t=>{const e=t.currentTarget;this.renderRoot.querySelector("#confirm").show(e),this.__deletionConfimationCallback=()=>{const t=e.parentElement.firstElementChild.querySelector("[href]");null==t||t.delete(),this.__deletionConfimationCallback=null}})))},this.__filter=""}static get properties(){return u(u({},super.properties),{},{keepDialogOpenOnDelete:{type:Boolean,attribute:"keep-dialog-open-on-delete"},keepDialogOpenOnPost:{type:Boolean,attribute:"keep-dialog-open-on-post"},hideDeleteButton:{type:Boolean,attribute:"hide-delete-button"},hideCreateButton:{type:Boolean,attribute:"hide-create-button"},createPageHref:{attribute:"create-page-href"},getPageHref:{attribute:!1},related:{type:Array},first:{},limit:{type:Number},form:{},formProps:{type:Object,attribute:"form-props"},item:{},itemProps:{type:Object,attribute:"item-props"},wide:{type:Boolean},alert:{type:Boolean},actions:{attribute:!1},bulkActions:{attribute:!1},filters:{type:Array},__filter:{attribute:!1},__selection:{attribute:!1},__isSelecting:{attribute:!1},__notification:{attribute:!1},__isFilterVisible:{attribute:!1},__activeBulkAction:{attribute:!1}})}renderControl(){var t,e,i,o=this;let n;try{const e=new URL(null!==(t=this.first)&&void 0!==t?t:""),i=new URLSearchParams(this.__filter);e.searchParams.set("limit",String(this.limit)),i.forEach(((t,i)=>e.searchParams.set(i,t))),n=e.toString()}catch(t){n=void 0}return h(R||(R=q` ${0} ${0} <div class="flex gap-m items-center justify-between text-l font-medium"> <span class="text-body mr-auto"> ${0} </span> ${0} ${0} ${0} </div> <div class="text-secondary text-s" ?hidden="${0}"> ${0} </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page class="${0}" infer="card" .related="${0}" .props="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> <vaadin-notification position="bottom-end" duration="3000" theme="${0}" .renderer="${0}"> </vaadin-notification> `),this.form&&!this.__isSelecting?h(j||(j=q` <foxy-form-dialog parent="${0}" infer="dialog" id="form" ?wide="${0}" ?alert="${0}" ?keep-open-on-post="${0}" ?keep-open-on-delete="${0}" .related="${0}" .props="${0}" .form="${0}"> </foxy-form-dialog> `),p(null!==(e=this.first)&&void 0!==e?e:void 0),this.wide,this.alert,this.keepDialogOpenOnPost,this.keepDialogOpenOnDelete,this.related,this.formProps,this.form):"",this.hideDeleteButton||this.readonly||this.__isSelecting?"":h(N||(N=q` <foxy-internal-confirm-dialog message="delete_message" confirm="delete_confirm" cancel="delete_cancel" header="delete_header" theme="error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> `),(t=>{var e;t.detail.cancelled||null===(e=this.__deletionConfimationCallback)||void 0===e||e.call(this)})),this.label&&"label"!==this.label?this.label:"",this.filters.length>0&&!this.__isSelecting?h(B||(B=q` <foxy-internal-async-list-control-filter-overlay .noVerticalOverlap="${0}" .positionTarget="${0}" .model="${0}" ?opened="${0}" @vaadin-overlay-close="${0}" @search="${0}"> </foxy-internal-async-list-control-filter-overlay> <vaadin-button theme="tertiary-inline contrast" id="filters" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="search_button_text"></foxy-i18n> </vaadin-button> `),!0,this.renderRoot.querySelector("#filters"),{options:this.filters,value:this.__filter,lang:this.lang,ns:this.ns},this.__isFilterVisible,(()=>this.__isFilterVisible=!1),(t=>{var e;this.__filter=null!==(e=t.detail)&&void 0!==e?e:""}),this.disabled,(()=>this.__isFilterVisible=!this.__isFilterVisible)):"",this.bulkActions.length>0&&this.first?h(z||(z=q` ${0} <vaadin-button theme="tertiary-inline contrast" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="${0}"> </foxy-i18n> </vaadin-button> `),this.__selection.length>0?this.bulkActions.map((t=>{var e;const i=`${t.name}_bulk_action_notification`,n=`${t.name}_bulk_action_caption`,a=(null===(e=this.__activeBulkAction)||void 0===e?void 0:e.name)===t.name;return h(H||(H=q` <vaadin-button data-testclass="bulk-action" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="${0}_${0}" .options="${0}"> </foxy-i18n> </vaadin-button> `),this.disabled||!!this.__activeBulkAction,(async function(){var e;o.__activeBulkAction=t;try{await t.onClick(o.__selection),o.__selection=[],o.__isSelecting=!1,o.__notification={key:`${i}_done`,theme:"success"}}catch(t){o.__notification={key:`${i}_fail`,theme:"error"}}finally{o.__activeBulkAction=null,null===(e=o.renderRoot.querySelector("vaadin-notification"))||void 0===e||e.open()}}),n,a?"busy":"idle",{count:this.__selection.length})})):"",this.disabled||!!this.__activeBulkAction,(()=>{this.__isSelecting=!this.__isSelecting,this.__selection=[]}),this.__isSelecting?"cancel_button_text":"select_button_text"):"",!this.form&&!this.createPageHref||this.readonly||this.hideCreateButton||this.__isSelecting?"":this.createPageHref&&!this.disabled?h(D||(D=q` <a class="rounded-s text-primary group focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="create_button_text"> </foxy-i18n> </a> `),this.createPageHref):h(I||(I=q` <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="create_button_text"></foxy-i18n> </vaadin-button> `),this.disabled,(t=>{t.preventDefault(),t.stopPropagation();const e=this.__dialog,i=t.currentTarget;e.header="header_create",e.href="",e.show(i)})),!this.helperText||"helper_text"===this.helperText,this.helperText,p(n),_({"block divide-y divide-contrast-5 bg-contrast-5 rounded overflow-hidden":!0,"mt-s":!!this.label&&"label"!==this.label||!!this.helperText&&"helper_text"!==this.helperText}),this.related,this.itemProps,this.__itemRenderer,!this._errorMessage||this.disabled||this.readonly||this.__isSelecting,this._errorMessage,p(null===(i=this.__notification)||void 0===i?void 0:i.theme),(t=>{var e,i;t.firstElementChild||(t.innerHTML="<span></span>");const o=null===(e=this.__notification)||void 0===e?void 0:e.theme,n=h(L||(L=q` <foxy-i18n style="color:var(--lumo-${0}-color)" lang="${0}" key="${0}" ns="${0} pagination"> </foxy-i18n> `),o?`${o}-contrast`:"body-text",this.lang,null===(i=this.__notification)||void 0===i?void 0:i.key,this.ns);m(n,t.firstElementChild)}))}get __dialog(){return this.renderRoot.querySelector("#form")}get __cardRenderer(){var t;const e=this.item;return(null===(t=this.__cachedCardRenderer)||void 0===t?void 0:t.item)!==e&&(this.__cachedCardRenderer={item:e,render:"string"==typeof e?new Function("ctx",`return ctx.html\`\n <${e}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n style="padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"\n infer=""\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${e}>\``):t=>h(V||(V=q` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> `),null==e?void 0:e(t))}),this.__cachedCardRenderer.render}}),customElements.define(w.is,w);
|
|
280
|
+
`}static get is(){return"vaadin-notification"}static get version(){return"1.6.2"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function,_notificationTemplate:Object}}static get observers(){return["_durationChanged(duration, opened)","_templateOrRendererChanged(_notificationTemplate, renderer, opened)"]}ready(){super.ready(),this._observer=new i(this,(t=>{this._setTemplateFromNodes(t.addedNodes)}))}_setTemplateFromNodes(t){this._notificationTemplate=t.filter((t=>t.localName&&"template"===t.localName))[0]||this._notificationTemplate}render(){"function"==typeof this.renderer&&this.renderer(this._card,this)}_removeNewRendererOrTemplate(t,e,i,o){t!==e?this._notificationTemplate=void 0:i!==o&&(this.renderer=void 0)}_templateOrRendererChanged(t,e,i){if(t&&e)throw this._removeNewRendererOrTemplate(t,this._oldTemplate,e,this._oldRenderer),new Error("You should only use either a renderer or a template for notification content");this._oldTemplate=t;const o=this._oldRenderer!==e;if(this._oldRenderer=e,e){if(this._card=this.$["vaadin-notification-card"],o)for(;this._card.firstChild;)this._card.removeChild(this._card.firstChild);i&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.render())}}open(){this.opened=!0}close(){this.opened=!1}get _container(){return y._container||(y._container=document.createElement("vaadin-notification-container"),document.body.appendChild(y._container)),y._container}_openedChanged(t){t?(this._container.opened=!0,this._instance||this.renderer||this._ensureTemplatized(),this._animatedAppendNotificationCard(),setTimeout((()=>this._updateShadyButtonStyles()))):this._card&&this._closeNotificationCard()}_ensureTemplatized(){if(this._notificationTemplate=this.querySelector("template")||this._notificationTemplate,!this._notificationTemplate)return;this._notificationTemplate._Templatizer||(this._notificationTemplate._Templatizer=o(this._notificationTemplate,this,{forwardHostProp:function(t,e){this._instance&&this._instance.forwardHostProp(t,e)}})),this._instance=new this._notificationTemplate._Templatizer({});const t=this._notificationTemplate.getRootNode(),e=t!==document;if(this._card=this.$["vaadin-notification-card"],this._cardContent=this._card.shadowRoot.querySelector('[part~="content"]'),e){if(this._cardContent.shadowRoot||this._cardContent.attachShadow({mode:"open"}),window.ShadyCSS&&!window.ShadyCSS.nativeShadow){var i=t.host&&t.host.localName;i&&-1===i.indexOf("-")&&(i=t.host.getAttribute("is")),i&&this._cardContent.setAttribute("is",i)}else{const e=Array.from(t.querySelectorAll("style")).reduce(((t,e)=>t+e.textContent),"").replace(/:host/g,":host-nomatch");if(e){const t=document.createElement("style");t.textContent=e,this._cardContent.shadowRoot.appendChild(t)}}this._cardContent.shadowRoot.appendChild(this._instance.root)}else this._card.appendChild(this._instance.root);this._card.setAttribute("aria-label",this._card.textContent.trim())}_animatedAppendNotificationCard(){if(this._card){this._card.setAttribute("opening",""),this._appendNotificationCard();const t=()=>{this._card.removeEventListener("animationend",t),this._card.removeAttribute("opening")};this._card.addEventListener("animationend",t),this._didAnimateNotificationAppend=!0}else this._didAnimateNotificationAppend=!1}_appendNotificationCard(){this._card&&(this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)?(this._card.slot=this.position,this._container.firstElementChild&&/top/.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)):window.console.warn(`Invalid alignment parameter provided: position=${this.position}`))}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=Boolean(this._container.firstElementChild)}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");if(t&&"none"!=t){const t=()=>{this._removeNotificationCard(),this._card.removeEventListener("animationend",t)};this._card.addEventListener("animationend",t)}else this._removeNotificationCard()}_positionChanged(t){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout((()=>this.close()),t)))}_updateShadyButtonStyles(){window.ShadyCSS&&!this.__buttonStylesPending&&(customElements.whenDefined("vaadin-button").then((()=>{Array.from(this._card.querySelectorAll("*")).filter((t=>t instanceof customElements.get("vaadin-button"))).forEach((t=>{const e=["--_lumo-button-color","--_lumo-button-background-color","--_lumo-button-primary-color","--_lumo-button-primary-background-color"].reduce(((t,e)=>{const i=window.ShadyCSS.getComputedStyleValue(this._card,e);return i&&(t[e]=i),t}),{});t.updateStyles(e)})),this.__buttonStylesPending=!1})),this.__buttonStylesPending=!0)}}customElements.define(v.is,v),customElements.define(g.is,g),customElements.define(y.is,y);let b;d("vaadin-checkbox",c(b||(b=(t=>t)`:host([data-async-list-control]) label{display:flex}:host([data-async-list-control]) [part=label]{width:100%;margin:0!important}`)));let x,$=t=>t;const C=t=>class e extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1}}}static get observers(){return["__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign,\n noHorizontalOverlap, noVerticalOverlap)"]}constructor(){super();const t=this._updatePosition.bind(this);this.addEventListener("opened-changed",(e=>{const i=e.detail.value?"addEventListener":"removeEventListener";window[i]("scroll",t),window[i]("resize",t),e.detail.value&&this._updatePosition()}))}ready(){super.ready(),console.warn("PositionMixin is not considered stable and might change any time")}__positionSettingsChanged(){this._updatePosition()}_updatePosition(){if(!this.positionTarget)return;const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)})));const e="rtl"===t.direction,i=this.positionTarget.getBoundingClientRect(),o=this.__calculateHorizontalPosition(i,e),n=this.__calculateVerticalPosition(i),a=Object.assign({},o,n);this.__doSetPosition(a,e)}__calculateHorizontalPosition(t,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const n=Math.min(window.innerWidth,document.documentElement.clientWidth),a=!i&&"start"===this.horizontalAlign||i&&"end"===this.horizontalAlign,r=!!this.style.left;return e.__calculatePositionInOneDimension(t,o,n,this.__margins,a,r,this.noHorizontalOverlap,{start:"left",end:"right"})}__calculateVerticalPosition(t){const i=Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),n="top"===this.verticalAlign,a=!!this.style.top;return e.__calculatePositionInOneDimension(t,i,o,this.__margins,n,a,this.noVerticalOverlap,{start:"top",end:"bottom"})}static __calculatePositionInOneDimension(t,e,i,o,n,a,r,s){const l=i-t[r?s.end:s.start]-o[s.end],d=t[r?s.start:s.end]-o[s.start],c=n?l:d,h=n===(c>(n?d:l)||c>e),m=h?s.start:s.end,u=h?s.end:s.start,p=(h?t[r?s.end:s.start]:i-t[r?s.start:s.end])+"px",_={};return _[m]=p,_[u]="",_}__doSetPosition(t,e){Object.assign(this.style,t);const i=!e&&t.left||e&&t.right;this.style.alignItems=i?"flex-start":"flex-end",this.style.justifyContent=t.top?"flex-start":"flex-end"}};class w extends(C(s)){constructor(){super(...arguments),this.renderer=(t,e,i)=>{var o;const n=null!==(o=t.firstElementChild)&&void 0!==o?o:document.createElement("div");t.firstElementChild||t.appendChild(n);const a=i,r=h(x||(x=$` <div style="display:grid;gap:var(--lumo-space-m);padding:var(--lumo-space-s);width:22rem"> <foxy-query-builder lang="${0}" ns="${0}" .options="${0}" .value="${0}"> </foxy-query-builder> <div style="display:flex;justify-content:space-between"> <vaadin-button theme="primary" style="margin:0" @click="${0}"> <foxy-i18n lang="${0}" ns="${0}" key="search"></foxy-i18n> </vaadin-button> <vaadin-button theme="secondary contrast" style="margin:0" @click="${0}"> <foxy-i18n lang="${0}" ns="${0}" key="clear"></foxy-i18n> </vaadin-button> </div> </div> `),a.lang,`${a.ns} query-builder`.trim(),a.options,a.value,(()=>{var t;const e=null!==(t=n.querySelector("foxy-query-builder").value)&&void 0!==t?t:"";this.dispatchEvent(new CustomEvent("search",{detail:e}))}),a.lang,a.ns,(()=>this.dispatchEvent(new CustomEvent("search"))),a.lang,a.ns);m(r,n)}}static get is(){return"foxy-internal-async-list-control-filter-overlay"}}let k,S,P,T,A,E,O,R,j,N,B,z,H,D,L,V,I,q=t=>t;customElements.define("foxy-internal-async-list-control",class extends l{constructor(){super(...arguments),this.keepDialogOpenOnDelete=!1,this.keepDialogOpenOnPost=!1,this.createPageHref=null,this.bulkActions=[],this.related=[],this.actions=[],this.filters=[],this.limit=20,this.first=null,this.form=null,this.formProps={},this.item=null,this.itemProps={},this.wide=!1,this.alert=!1,this.hideDeleteButton=!1,this.hideCreateButton=!1,this.getPageHref=null,this.__deletionConfimationCallback=null,this.__cachedCardRenderer=null,this.__activeBulkAction=null,this.__isFilterVisible=!1,this.__notification=null,this.__isSelecting=!1,this.__selection=[],this.__itemRenderer=t=>{var e;if(!t.data)return this.__cardRenderer(t);if(this.__isSelecting)return h(k||(k=q` <vaadin-checkbox class="block w-full" style="padding-left:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" data-async-list-control ?disabled="${0}" ?checked="${0}" @change="${0}"> ${0} </vaadin-checkbox> `),this.disabled||!!this.__activeBulkAction,this.__selection.find((e=>e._links.self.href===t.data._links.self.href)),(e=>{e.currentTarget.checked?this.__selection=[...this.__selection,t.data]:this.__selection=this.__selection.filter((e=>e._links.self.href!==t.data._links.self.href))}),this.__cardRenderer(t));if("string"!=typeof(null===(e=this.getPageHref)||void 0===e?void 0:e.call(this,t.href,t.data))&&!this.form)return this.__cardRenderer(t);const i=this.disabledSelector.matches("card",!0),o=this.__cardRenderer(t);let n;const a=_({"rounded-t":!t.previous,"rounded-b":!t.next,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block transition-colors":!0,"hover-bg-contrast-5":!i});if(this.getPageHref)if(i)n=h(S||(S=q`<div class="${0}">${0}</div>`),a,o);else{const e=this.getPageHref(t.href,t.data);n=h(P||(P=q`<a class="${0}" href="${0}">${0}</a>`),a,e,o)}else{n=h(T||(T=q` <button ?disabled="${0}" class="${0}" @click="${0}">${0}</button> `),i,a,(e=>{const i=new CustomEvent("itemclick",{cancelable:!0,composed:!0,bubbles:!0,detail:t.href});if(this.dispatchEvent(i)){const i=e.currentTarget,o=this.__dialog;o.header="header_update",o.href=t.href,o.show(i)}}),o)}return this.hideDeleteButton&&!this.actions.length||this.readonly?n:h(A||(A=q` <foxy-swipe-actions class="block"> ${0} ${0} ${0} </foxy-swipe-actions> `),n,this.actions.map((e=>h(E||(E=q` <vaadin-button data-testclass="action" theme="${0}" class="h-full rounded-none relative" slot="action" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" infer="" key="${0}"> </foxy-i18n> <div class="${0}"> <foxy-spinner layout="no-label" infer="spinner" state="${0}"> </foxy-spinner> </div> </vaadin-button> `),e.theme,this.disabled,(()=>e.onClick(t.data)),_({"transition-opacity":!0,"opacity-0":"idle"!==e.state}),e.text,_({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===e.state}),e.state))),this.hideDeleteButton?"":h(O||(O=q` <vaadin-button theme="primary error" class="h-full rounded-none" slot="action" @click="${0}"> <foxy-i18n infer="" key="delete_button_text"></foxy-i18n> </vaadin-button> `),(t=>{const e=t.currentTarget;this.renderRoot.querySelector("#confirm").show(e),this.__deletionConfimationCallback=()=>{const t=e.parentElement.firstElementChild.querySelector("[href]");null==t||t.delete(),this.__deletionConfimationCallback=null}})))},this.__filter=""}static get properties(){return u(u({},super.properties),{},{keepDialogOpenOnDelete:{type:Boolean,attribute:"keep-dialog-open-on-delete"},keepDialogOpenOnPost:{type:Boolean,attribute:"keep-dialog-open-on-post"},hideDeleteButton:{type:Boolean,attribute:"hide-delete-button"},hideCreateButton:{type:Boolean,attribute:"hide-create-button"},createPageHref:{attribute:"create-page-href"},getPageHref:{attribute:!1},related:{type:Array},first:{},limit:{type:Number},form:{},formProps:{type:Object,attribute:"form-props"},item:{},itemProps:{type:Object,attribute:"item-props"},wide:{type:Boolean},alert:{type:Boolean},actions:{attribute:!1},bulkActions:{attribute:!1},filters:{type:Array},__filter:{attribute:!1},__selection:{attribute:!1},__isSelecting:{attribute:!1},__notification:{attribute:!1},__isFilterVisible:{attribute:!1},__activeBulkAction:{attribute:!1}})}renderControl(){var t,e,i,o=this;let n;try{const e=new URL(null!==(t=this.first)&&void 0!==t?t:""),i=new URLSearchParams(this.__filter);e.searchParams.set("limit",String(this.limit)),i.forEach(((t,i)=>e.searchParams.set(i,t))),n=e.toString()}catch(t){n=void 0}return h(R||(R=q` ${0} ${0} <div class="flex gap-m items-center justify-between text-l font-medium"> <span class="text-body mr-auto"> ${0} </span> ${0} ${0} ${0} </div> <div class="text-secondary text-s" ?hidden="${0}"> ${0} </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page class="${0}" infer="card" .related="${0}" .props="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> <vaadin-notification position="bottom-end" duration="3000" theme="${0}" .renderer="${0}"> </vaadin-notification> `),this.form&&!this.__isSelecting?h(j||(j=q` <foxy-form-dialog parent="${0}" infer="dialog" id="form" ?wide="${0}" ?alert="${0}" ?keep-open-on-post="${0}" ?keep-open-on-delete="${0}" .related="${0}" .props="${0}" .form="${0}"> </foxy-form-dialog> `),p(null!==(e=this.first)&&void 0!==e?e:void 0),this.wide,this.alert,this.keepDialogOpenOnPost,this.keepDialogOpenOnDelete,this.related,this.formProps,this.form):"",this.hideDeleteButton||this.readonly||this.__isSelecting?"":h(N||(N=q` <foxy-internal-confirm-dialog message="delete_message" confirm="delete_confirm" cancel="delete_cancel" header="delete_header" theme="error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> `),(t=>{var e;t.detail.cancelled||null===(e=this.__deletionConfimationCallback)||void 0===e||e.call(this)})),this.label&&"label"!==this.label?this.label:"",this.filters.length>0&&!this.__isSelecting?h(B||(B=q` <foxy-internal-async-list-control-filter-overlay .noVerticalOverlap="${0}" .positionTarget="${0}" .model="${0}" ?opened="${0}" @vaadin-overlay-close="${0}" @search="${0}"> </foxy-internal-async-list-control-filter-overlay> <vaadin-button theme="tertiary-inline contrast" id="filters" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="search_button_text"></foxy-i18n> </vaadin-button> `),!0,this.renderRoot.querySelector("#filters"),{options:this.filters,value:this.__filter,lang:this.lang,ns:this.ns},this.__isFilterVisible,(()=>this.__isFilterVisible=!1),(t=>{var e;this.__filter=null!==(e=t.detail)&&void 0!==e?e:""}),this.disabled,(()=>this.__isFilterVisible=!this.__isFilterVisible)):"",this.bulkActions.length>0&&this.first?h(z||(z=q` ${0} <vaadin-button theme="tertiary-inline contrast" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="${0}"> </foxy-i18n> </vaadin-button> `),this.__selection.length>0?this.bulkActions.map((t=>{var e;const i=`${t.name}_bulk_action_notification`,n=`${t.name}_bulk_action_caption`,a=(null===(e=this.__activeBulkAction)||void 0===e?void 0:e.name)===t.name;return h(H||(H=q` <vaadin-button data-testclass="bulk-action" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="${0}_${0}" .options="${0}"> </foxy-i18n> </vaadin-button> `),this.disabled||!!this.__activeBulkAction,(async function(){var e;o.__activeBulkAction=t;try{await t.onClick(o.__selection),o.__selection=[],o.__isSelecting=!1,o.__notification={key:`${i}_done`,theme:"success"}}catch(t){o.__notification={key:`${i}_fail`,theme:"error"}}finally{o.__activeBulkAction=null,null===(e=o.renderRoot.querySelector("vaadin-notification"))||void 0===e||e.open()}}),n,a?"busy":"idle",{count:this.__selection.length})})):"",this.disabled||!!this.__activeBulkAction,(()=>{this.__isSelecting=!this.__isSelecting,this.__selection=[]}),this.__isSelecting?"cancel_button_text":"select_button_text"):"",!this.form&&!this.createPageHref||this.readonly||this.hideCreateButton||this.__isSelecting?"":this.createPageHref&&!this.disabled?h(D||(D=q` <a class="rounded-s text-primary group focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="create_button_text"> </foxy-i18n> </a> `),this.createPageHref):h(L||(L=q` <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="pagination" key="create_button_text"></foxy-i18n> </vaadin-button> `),this.disabled,(t=>{t.preventDefault(),t.stopPropagation();const e=this.__dialog,i=t.currentTarget;e.header="header_create",e.href="",e.show(i)})),!this.helperText||"helper_text"===this.helperText,this.helperText,p(n),_({"block divide-y divide-contrast-5 bg-contrast-5 rounded overflow-hidden":!0,"mt-s":!!this.label&&"label"!==this.label||!!this.helperText&&"helper_text"!==this.helperText}),this.related,this.itemProps,this.__itemRenderer,!this._errorMessage||this.disabled||this.readonly||this.__isSelecting,this._errorMessage,p(null===(i=this.__notification)||void 0===i?void 0:i.theme),(t=>{var e,i;t.firstElementChild||(t.innerHTML="<span></span>");const o=null===(e=this.__notification)||void 0===e?void 0:e.theme,n=h(V||(V=q` <foxy-i18n style="color:var(--lumo-${0}-color)" lang="${0}" key="${0}" ns="${0} pagination"> </foxy-i18n> `),o?`${o}-contrast`:"body-text",this.lang,null===(i=this.__notification)||void 0===i?void 0:i.key,this.ns);m(n,t.firstElementChild)}))}get __dialog(){return this.renderRoot.querySelector("#form")}get __cardRenderer(){var t;const e=this.item;return(null===(t=this.__cachedCardRenderer)||void 0===t?void 0:t.item)!==e&&(this.__cachedCardRenderer={item:e,render:"string"==typeof e?new Function("ctx",`return ctx.html\`\n <${e}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n style="padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"\n infer=""\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${e}>\``):t=>h(I||(I=q` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> `),null==e?void 0:e(t))}),this.__cachedCardRenderer.render}}),customElements.define(w.is,w);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-46de2ed2.js";import{a as e}from"./shared-0fe1dd67.js";import{_ as t}from"./shared-d1195c27.js";import{c as s,h as i,s as r}from"./shared-dc73b9a5.js";import{i as l}from"./shared-9803aa7c.js";import{c as a}from"./shared-4e709717.js";import{l as o}from"./shared-22ba9566.js";let d,n,u,h,p,c,f,m,v=e=>e;customElements.define("foxy-internal-text-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},__isErrorVisible:{attribute:!1}})}static get styles(){return[super.styles,s(d||(d=v`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(n||(n=v` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),l(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.prefix?i(u||(u=v`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?i(h||(h=v`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderSummaryItemLayout(){return i(p||(p=v` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs" style="min-width:30%"> ${0} <input placeholder="${0}" class="${0}" type="text" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,this.prefix?i(c||(c=v`<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}),o(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(),this._value=e.target.value}),this.suffix?i(f||(f=v`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.t("clear"),a({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value="",this.dispatchEvent(new CustomEvent("clear"))}),r(m||(m=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-4e6c65e6.js";import"./shared-46de2ed2.js";import{a as e}from"./shared-0fe1dd67.js";import{x as t}from"./shared-e766f6e0.js";import{c as r,h as a,s as o}from"./shared-dc73b9a5.js";import{_ as l}from"./shared-d1195c27.js";import{i as s}from"./shared-9803aa7c.js";import{c as i}from"./shared-4e709717.js";let n;function m(e){var t,r,a;const o=null!==(t=null==e?void 0:e.separator)&&void 0!==t?t:"-",l=null!==(r=null==e?void 0:e.charset)&&void 0!==r?r:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=null!==(a=null==e?void 0:e.length)&&void 0!==a?a:18;let i="";for(let e=0;e<s;e++)o&&e>0&&e%6==0&&(i+=o),i+=l[Math.floor(Math.random()*l.length)];return i}t("vaadin-password-field",r(n||(n=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}`)));let d,h,u,p=e=>e;customElements.define("foxy-internal-password-control",class extends e{constructor(){super(...arguments),this.generatorOptions=null,this.showGenerator=!1,this.layout=null}static get properties(){return l(l({},super.properties),{},{generatorOptions:{type:Object,attribute:"generator-options"},showGenerator:{type:Boolean,attribute:"show-generator"},layout:{}})}renderControl(){var e;return a(d||(d=p` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" theme="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} </vaadin-password-field> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.layout)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.showGenerator?this.__renderGenerator():"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderGenerator(){return a(h||(h=p` <div data-testid="generator" class="${0}" slot="suffix" @click="${0}"> ${0} </div> `),i({"w-s h-s flex items-center justify-center cursor-default transition-colors":!0,"text-contrast-60 hover-text-contrast-80":!this.disabled&&!this.readonly,"text-contrast-20":this.disabled||this.readonly}),(()=>{var e,t,r,a;let o,l=!1,s=0;do{o=m(null!==(e=this.generatorOptions)&&void 0!==e?e:void 0),l=null===(a=null===(r=null===(t=this.generatorOptions)||void 0===t?void 0:t.checkStrength)||void 0===r?void 0:r.call(t,o))||void 0===a||a,s++}while(!l&&s<100);if(!l)throw new Error("Failed to generate a strong password.");this._value=o;const i=this.renderRoot.querySelector("vaadin-password-field");null==i||i._setPasswordVisible(!0)}),o(u||(u=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.15em; height: 1.15em"><path d="M15.98 1.804a1 1 0 00-1.96 0l-.24 1.192a1 1 0 01-.784.785l-1.192.238a1 1 0 000 1.962l1.192.238a1 1 0 01.785.785l.238 1.192a1 1 0 001.962 0l.238-1.192a1 1 0 01.785-.785l1.192-.238a1 1 0 000-1.962l-1.192-.238a1 1 0 01-.785-.785l-.238-1.192zM6.949 5.684a1 1 0 00-1.898 0l-.683 2.051a1 1 0 01-.633.633l-2.051.683a1 1 0 000 1.898l2.051.684a1 1 0 01.633.632l.683 2.051a1 1 0 001.898 0l.683-2.051a1 1 0 01.633-.633l2.051-.683a1 1 0 000-1.898l-2.051-.683a1 1 0 01-.633-.633L6.95 5.684zM13.949 13.684a1 1 0 00-1.898 0l-.184.551a1 1 0 01-.632.633l-.551.183a1 1 0 000 1.898l.551.183a1 1 0 01.633.633l.183.551a1 1 0 001.898 0l.184-.551a1 1 0 01.632-.633l.551-.183a1 1 0 000-1.898l-.551-.184a1 1 0 01-.633-.632l-.183-.551z" /></svg>`)))}});
|