@foxy.io/elements 1.17.0 → 1.18.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +3 -85
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-api-browser.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-cancellation-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-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.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +2 -2
- 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-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.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-form.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.js +1 -1
- package/dist/cdn/foxy-item-card.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-pagination.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-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +4 -4
- package/dist/cdn/foxy-reports-table.js +6 -6
- package/dist/cdn/foxy-shipment-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-shipping-method-card.js +1 -0
- package/dist/cdn/foxy-store-shipping-method-form.js +150 -0
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +4 -4
- 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-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-user-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-7474af47.js → shared-0561e4c0.js} +1 -1
- package/dist/cdn/{shared-4e201e09.js → shared-12f8034b.js} +1 -1
- package/dist/cdn/{shared-8d937ae4.js → shared-17331dc5.js} +3 -3
- package/dist/cdn/{shared-322e7efb.js → shared-18fa34a8.js} +1 -1
- package/dist/cdn/{shared-bf6fb415.js → shared-1eb23210.js} +1 -1
- package/dist/cdn/shared-2b077e01.js +134 -0
- package/dist/cdn/{shared-d28ac9dc.js → shared-32b15545.js} +1 -1
- package/dist/cdn/{shared-62169210.js → shared-33b47806.js} +3 -3
- package/dist/cdn/{shared-c8677ba3.js → shared-354e0ed8.js} +1 -1
- package/dist/cdn/{shared-3b2dedf9.js → shared-40689cd2.js} +1 -1
- package/dist/cdn/{shared-6d104622.js → shared-48ef8a04.js} +1 -1
- package/dist/cdn/{shared-5c3a88d2.js → shared-4b85b408.js} +1 -1
- package/dist/cdn/{shared-7c612495.js → shared-4de4a8bc.js} +1 -1
- package/dist/cdn/{shared-8d4fef94.js → shared-4eae0021.js} +1 -1
- package/dist/cdn/{shared-8e9a3bbb.js → shared-4fc53390.js} +1 -1
- package/dist/cdn/shared-593c3727.js +1 -0
- package/dist/cdn/{shared-d699348f.js → shared-59796faa.js} +2 -2
- package/dist/cdn/{shared-a0836fa5.js → shared-6bcd6831.js} +1 -1
- package/dist/cdn/{shared-39f2c345.js → shared-7b7b6065.js} +1 -1
- package/dist/cdn/shared-7c977470.js +1 -0
- package/dist/cdn/{shared-c89ba319.js → shared-7ed7818e.js} +1 -1
- package/dist/cdn/{shared-2bdd4f74.js → shared-80ca2f70.js} +2 -2
- package/dist/cdn/{shared-195fd5af.js → shared-8936b109.js} +1 -1
- package/dist/cdn/shared-91a28cfe.js +1 -0
- package/dist/cdn/{shared-f84686a8.js → shared-93d93d79.js} +1 -1
- package/dist/cdn/shared-97654b20.js +169 -0
- package/dist/cdn/{shared-baf79b0b.js → shared-9d905cdc.js} +1 -1
- package/dist/cdn/{shared-dd6d3c18.js → shared-9f9cdbb0.js} +1 -1
- package/dist/cdn/{shared-dc23b751.js → shared-a64ead08.js} +1 -1
- package/dist/cdn/{shared-a5e52b8f.js → shared-b52c7edf.js} +3 -3
- package/dist/cdn/{shared-ae415a98.js → shared-c13674cb.js} +1 -1
- package/dist/cdn/{shared-a052131e.js → shared-c5a638d1.js} +1 -1
- package/dist/cdn/{shared-c309e0ef.js → shared-c73ca2c5.js} +1 -1
- package/dist/cdn/{shared-c5c60417.js → shared-d539ee69.js} +1 -1
- package/dist/cdn/shared-d6dd67a5.js +82 -0
- package/dist/cdn/{shared-31c43743.js → shared-dbdc2a38.js} +1 -1
- package/dist/cdn/{shared-f1317609.js → shared-e06de519.js} +1 -1
- package/dist/cdn/{shared-dda2a74d.js → shared-e144edd2.js} +1 -1
- package/dist/cdn/{shared-bb686fc6.js → shared-e28fb2ef.js} +1 -1
- package/dist/cdn/{shared-b3df4f38.js → shared-e8312a29.js} +1 -1
- package/dist/cdn/{shared-2188d5f7.js → shared-fd001fd3.js} +1 -1
- package/dist/cdn/translations/store-shipping-method-card/en.json +15 -0
- package/dist/cdn/translations/store-shipping-method-form/en.json +83 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +2 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +10 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
- package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.d.ts +17 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js +51 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/InternalCheckboxGroupControl.js.map +1 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/index.d.ts +6 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/index.js +8 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/index.js.map +1 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/types.d.ts +6 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/types.js +2 -0
- package/dist/elements/internal/InternalCheckboxGroupControl/types.js.map +1 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +2 -0
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +6 -4
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
- package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.d.ts +13 -0
- package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.js +40 -0
- package/dist/elements/internal/InternalTextAreaControl/InternalTextAreaControl.js.map +1 -0
- package/dist/elements/internal/InternalTextAreaControl/index.d.ts +4 -0
- package/dist/elements/internal/InternalTextAreaControl/index.js +6 -0
- package/dist/elements/internal/InternalTextAreaControl/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.d.ts +16 -0
- package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.js +60 -0
- package/dist/elements/public/StoreShippingMethodCard/StoreShippingMethodCard.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodCard/index.d.ts +6 -0
- package/dist/elements/public/StoreShippingMethodCard/index.js +8 -0
- package/dist/elements/public/StoreShippingMethodCard/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodCard/types.d.ts +5 -0
- package/dist/elements/public/StoreShippingMethodCard/types.js +2 -0
- package/dist/elements/public/StoreShippingMethodCard/types.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +25 -0
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +152 -0
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/index.d.ts +11 -0
- package/dist/elements/public/StoreShippingMethodForm/index.js +13 -0
- package/dist/elements/public/StoreShippingMethodForm/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.d.ts +5 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js +33 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.d.ts +6 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js +8 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.d.ts +19 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js +96 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.d.ts +5 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js +7 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.d.ts +17 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js +45 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.d.ts +3 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js +5 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.d.ts +16 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js +49 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.d.ts +3 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js +5 -0
- package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js.map +1 -0
- package/dist/elements/public/StoreShippingMethodForm/types.d.ts +5 -0
- package/dist/elements/public/StoreShippingMethodForm/types.js +2 -0
- package/dist/elements/public/StoreShippingMethodForm/types.js.map +1 -0
- package/dist/elements/public/index.d.ts +2 -0
- package/dist/elements/public/index.defined.d.ts +2 -0
- package/dist/elements/public/index.defined.js +2 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +2 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +16 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-63685d2e.js +0 -302
- package/dist/cdn/shared-dc1c6edd.js +0 -1
- package/dist/cdn/shared-dc3ffd38.js +0 -1
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import{I as e,_ as t}from"./shared-fadcb2e1.js";import{F as a}from"./shared-2188d5f7.js";import{E as s,C as i,T as r}from"./shared-195fd5af.js";import"./shared-31c43743.js";import"./shared-4e201e09.js";import{a as l}from"./shared-d28ac9dc.js";import"./shared-dc23b751.js";import{h as n,P as o}from"./shared-ae415a98.js";import{d,P as h,A as u,L as c,c as p,h as m}from"./shared-dc73b9a5.js";import"./shared-a052131e.js";import{p as v}from"./shared-c309e0ef.js";import{a as g,y as b}from"./shared-62169210.js";import{T as _,U as f,V as y,W as x,X as w,Y as E,Z as T,$ as k,b as S,a0 as $,a1 as A,a2 as V,a3 as C,a4 as I,a5 as M,a6 as z,m as F,a7 as L}from"./shared-92327224.js";import{s as j}from"./shared-99940888.js";import{i as q}from"./shared-7c8bb60c.js";var P={raise:_,send:f,sendParent:y,sendUpdate:x,log:w,cancel:E,start:T,stop:k,assign:S,after:$,done:A,respond:V,forwardTo:C,escalate:I,choose:M,pure:z};const H=d((e=>t=>{const{element:a,name:s,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 h)a[s]!==e&&t.setValue(e);else{if(!(t instanceof u))throw new Error("live directive can only be used on attributes or properties");a.getAttribute(s)!==e&&t.setValue(e)}})),O=n`<dom-module id="lumo-text-area" theme-for="vaadin-text-area">
|
|
2
|
-
<template>
|
|
3
|
-
<style include="lumo-text-field">
|
|
4
|
-
[part="input-field"],
|
|
5
|
-
[part="input-field"] ::slotted(textarea) {
|
|
6
|
-
/* Equal to the implicit padding in vaadin-text-field */
|
|
7
|
-
padding-top: calc((var(--lumo-text-field-size) - 1em * var(--lumo-line-height-s)) / 2);
|
|
8
|
-
padding-bottom: calc((var(--lumo-text-field-size) - 1em * var(--lumo-line-height-s)) / 2);
|
|
9
|
-
height: auto;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
transition: background-color 0.1s;
|
|
12
|
-
line-height: var(--lumo-line-height-s);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:host(:not([readonly])) [part="input-field"]::after {
|
|
16
|
-
display: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:host([readonly]) [part="input-field"] {
|
|
20
|
-
border: 1px dashed var(--lumo-contrast-30pct);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host([readonly]) [part="input-field"]::after {
|
|
24
|
-
border: none;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:host(:hover:not([readonly]):not([focused]):not([invalid])) [part="input-field"] {
|
|
28
|
-
background-color: var(--lumo-contrast-20pct);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@media (pointer: coarse) {
|
|
32
|
-
:host(:hover:not([readonly]):not([focused]):not([invalid])) [part="input-field"] {
|
|
33
|
-
background-color: var(--lumo-contrast-10pct);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host(:active:not([readonly]):not([focused])) [part="input-field"] {
|
|
37
|
-
background-color: var(--lumo-contrast-20pct);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
[part="value"],
|
|
42
|
-
[part="input-field"] ::slotted(textarea) {
|
|
43
|
-
line-height: inherit;
|
|
44
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* Vertically align icon prefix/suffix with the first line of text */
|
|
48
|
-
[part="input-field"] ::slotted(iron-icon) {
|
|
49
|
-
margin-top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
[part="input-field"] [part="value"],
|
|
53
|
-
[part="input-field"] ::slotted(textarea) {
|
|
54
|
-
white-space: pre-wrap; /* override \`nowrap\` from <vaadin-text-field> */
|
|
55
|
-
align-self: stretch; /* override \`baseline\` from <vaadin-text-field> */
|
|
56
|
-
}
|
|
57
|
-
</style>
|
|
58
|
-
</template>
|
|
59
|
-
</dom-module>`;document.head.appendChild(O.content);
|
|
60
|
-
/**
|
|
61
|
-
@license
|
|
62
|
-
Copyright (c) 2017 Vaadin Ltd.
|
|
63
|
-
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
64
|
-
*/
|
|
65
|
-
class U extends(s(l(i(r(o))))){static get template(){return n`
|
|
66
|
-
<style include="vaadin-text-field-shared-styles">
|
|
67
|
-
.vaadin-text-area-container {
|
|
68
|
-
flex: auto;
|
|
69
|
-
max-height: inherit; /* MSIE 11 */
|
|
70
|
-
min-height: inherit; /* MSIE 11 */
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* The label, helper text and the error message should neither grow nor shrink. */
|
|
74
|
-
[part="label"],
|
|
75
|
-
[part="helper-text"],
|
|
76
|
-
[part="error-message"] {
|
|
77
|
-
flex: none;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
[part="input-field"] {
|
|
81
|
-
overflow: auto;
|
|
82
|
-
-webkit-overflow-scrolling: touch;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
[part="value"] {
|
|
86
|
-
resize: none;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
[part="value"],
|
|
90
|
-
[part="input-field"] ::slotted(*) {
|
|
91
|
-
align-self: flex-start;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@keyframes vaadin-text-area-appear {
|
|
95
|
-
to {
|
|
96
|
-
opacity: 1;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
:host {
|
|
101
|
-
animation: 1ms vaadin-text-area-appear;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* Workaround https://bugzilla.mozilla.org/show_bug.cgi?id=1739079 */
|
|
105
|
-
:host([disabled]) [part='value'] {
|
|
106
|
-
user-select: none;
|
|
107
|
-
}
|
|
108
|
-
</style>
|
|
109
|
-
|
|
110
|
-
<div class="vaadin-text-area-container">
|
|
111
|
-
|
|
112
|
-
<label part="label" on-click="focus" id="[[_labelId]]">[[label]]</label>
|
|
113
|
-
|
|
114
|
-
<div part="input-field" id="[[_inputId]]" on-scroll="__scrollPositionUpdated">
|
|
115
|
-
|
|
116
|
-
<slot name="prefix"></slot>
|
|
117
|
-
|
|
118
|
-
<slot name="textarea">
|
|
119
|
-
<textarea part="value"></textarea>
|
|
120
|
-
</slot>
|
|
121
|
-
|
|
122
|
-
<div part="clear-button" id="clearButton" role="button" aria-label\$="[[i18n.clear]]"></div>
|
|
123
|
-
<slot name="suffix"></slot>
|
|
124
|
-
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
<div part="helper-text" id="[[_helperTextId]]">
|
|
128
|
-
<slot name="helper">[[helperText]]</slot>
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
<div part="error-message" id="[[_errorId]]" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div>
|
|
132
|
-
|
|
133
|
-
</div>
|
|
134
|
-
`}static get is(){return"vaadin-text-area"}static get version(){return"2.9.2"}static get properties(){return{pattern:{type:String}}}static get observers(){return["_textAreaValueChanged(value)"]}ready(){super.ready(),this._updateHeight(),this.addEventListener("animationend",this._onAnimationEnd),this._inputField=this.root.querySelector("[part=input-field]"),this._inputField.addEventListener("wheel",(e=>{const t=this._inputField.scrollTop;this._inputField.scrollTop+=e.deltaY,t!==this._inputField.scrollTop&&(e.preventDefault(),this.__scrollPositionUpdated())})),this.__scrollPositionUpdated()}__scrollPositionUpdated(){this.updateStyles({"--_text-area-vertical-scroll-position":this._inputField.scrollTop+"px"})}_onAnimationEnd(e){0===e.animationName.indexOf("vaadin-text-area-appear")&&this._updateHeight()}get _slottedTagName(){return"textarea"}_textAreaValueChanged(e){this._updateHeight()}_updateHeight(){const e=this.root.querySelector("[part=input-field]"),t=e.scrollTop,a=this.inputElement,s=this.value?this.value.length:0;if(this._oldValueLength>=s){const t=getComputedStyle(e).height,s=getComputedStyle(a).width;e.style.display="block",e.style.height=t,a.style.maxWidth=s,a.style.height="auto"}this._oldValueLength=s;const i=a.scrollHeight;i>a.clientHeight&&(a.style.height=i+"px"),a.style.removeProperty("max-width"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=t,this._dispatchIronResizeEventIfNeeded("InputHeight",i)}checkValidity(){if(!super.checkValidity())return!1;if(!this.pattern||!this.inputElement.value)return!0;try{const e=this.inputElement.value.match(this.pattern);return!!e&&e[0]===e.input}catch(e){return!0}}}customElements.define(U.is,U);class N extends CustomEvent{constructor(e){super("change",{detail:e})}}const D=n`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
|
|
135
|
-
<template>
|
|
136
|
-
<style include="lumo-required-field">
|
|
137
|
-
:host {
|
|
138
|
-
--lumo-text-field-size: var(--lumo-size-m);
|
|
139
|
-
color: var(--lumo-body-text-color);
|
|
140
|
-
font-size: var(--lumo-font-size-m);
|
|
141
|
-
/* align with text-field height + vertical paddings */
|
|
142
|
-
line-height: calc(var(--lumo-text-field-size) + 2 * var(--lumo-space-xs));
|
|
143
|
-
font-family: var(--lumo-font-family);
|
|
144
|
-
-webkit-font-smoothing: antialiased;
|
|
145
|
-
-moz-osx-font-smoothing: grayscale;
|
|
146
|
-
-webkit-tap-highlight-color: transparent;
|
|
147
|
-
padding: 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
:host::before {
|
|
151
|
-
margin-top: var(--lumo-space-xs);
|
|
152
|
-
height: var(--lumo-text-field-size);
|
|
153
|
-
box-sizing: border-box;
|
|
154
|
-
display: inline-flex;
|
|
155
|
-
align-items: center;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/* align with text-field label */
|
|
159
|
-
:host([has-label]) [part="label"] {
|
|
160
|
-
padding-bottom: calc(0.5em - var(--lumo-space-xs));
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
:host(:not([has-label])) [part="label"],
|
|
164
|
-
:host(:not([has-label]))::before {
|
|
165
|
-
display: none;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/* align with text-field error message */
|
|
169
|
-
:host([invalid]) [part="error-message"]:not(:empty)::before {
|
|
170
|
-
height: calc(0.4em - var(--lumo-space-xs));
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
:host([focused]:not([readonly]):not([disabled])) [part="label"] {
|
|
174
|
-
color: var(--lumo-primary-text-color);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part="label"],
|
|
178
|
-
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part="helper-text"],
|
|
179
|
-
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part="helper-text"] ::slotted(*) {
|
|
180
|
-
color: var(--lumo-body-text-color);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
:host([has-helper]) [part="helper-text"]::before {
|
|
184
|
-
content: "";
|
|
185
|
-
display: block;
|
|
186
|
-
height: 0.4em;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
[part="helper-text"],
|
|
190
|
-
[part="helper-text"] ::slotted(*) {
|
|
191
|
-
display: block;
|
|
192
|
-
color: var(--lumo-secondary-text-color);
|
|
193
|
-
font-size: var(--lumo-font-size-xs);
|
|
194
|
-
line-height: var(--lumo-line-height-xs);
|
|
195
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
196
|
-
transition: color 0.2s;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/* helper-text position */
|
|
200
|
-
|
|
201
|
-
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::before {
|
|
202
|
-
display: none;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"]::after {
|
|
206
|
-
content: "";
|
|
207
|
-
display: block;
|
|
208
|
-
height: 0.4em;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
:host([has-helper][theme~="helper-above-field"]) [part="label"] {
|
|
212
|
-
order: 0;
|
|
213
|
-
padding-bottom: 0.4em;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
:host([has-helper][theme~="helper-above-field"]) [part="helper-text"] {
|
|
217
|
-
order: 1;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
:host([has-helper][theme~="helper-above-field"]) .inputs-wrapper {
|
|
221
|
-
order: 2;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
:host([has-helper][theme~="helper-above-field"]) [part="error-message"] {
|
|
225
|
-
order: 3;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/* Touch device adjustment */
|
|
229
|
-
@media (pointer: coarse) {
|
|
230
|
-
:host(:hover:not([readonly]):not([disabled]):not([focused])) [part="label"] {
|
|
231
|
-
color: var(--lumo-secondary-text-color);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/* Disabled style */
|
|
236
|
-
|
|
237
|
-
:host([disabled]) [part="label"] {
|
|
238
|
-
color: var(--lumo-disabled-text-color);
|
|
239
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/* Small theme */
|
|
243
|
-
|
|
244
|
-
:host([theme~="small"]) {
|
|
245
|
-
font-size: var(--lumo-font-size-s);
|
|
246
|
-
--lumo-text-field-size: var(--lumo-size-s);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
:host([theme~="small"][has-label]) [part="label"] {
|
|
250
|
-
font-size: var(--lumo-font-size-xs);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
:host([theme~="small"][has-label]) [part="error-message"] {
|
|
254
|
-
font-size: var(--lumo-font-size-xxs);
|
|
255
|
-
}
|
|
256
|
-
</style>
|
|
257
|
-
</template>
|
|
258
|
-
</dom-module>`;document.head.appendChild(D.content);const B=e=>class extends e{static get properties(){return{inputs:{type:Array,readOnly:!0},i18n:{type:Object,value:()=>({parseValue:function(e){return e.split("\t")},formatValue:function(e){return e.join("\t")}})},__errorId:String,__labelId:String,__helperTextId:String,__hasSlottedHelper:Boolean}}connectedCallback(){super.connectedCallback(),this.__observer&&this.__observer.connect()}disconnectedCallback(){super.disconnectedCallback(),this.__observer&&this.__observer.disconnect()}ready(){super.ready(),this.__setInputsFromSlot(),this.__observer=new a(this.$.slot,(()=>{this.__setInputsFromSlot()})),this.$.helperSlot.addEventListener("slotchange",this.__onHelperSlotChange.bind(this)),this.__onHelperSlotChange();const e=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);this.addEventListener("keydown",(t=>{if(9===t.keyCode){if("slot"===t.target.parentElement.localName&&!t.defaultPrevented&&e){const e=t.target.parentElement;e.setAttribute("tabindex",-1),setTimeout((()=>e.removeAttribute("tabindex")))}this.inputs.indexOf(t.target)<this.inputs.length-1&&!t.shiftKey||this.inputs.indexOf(t.target)>0&&t.shiftKey?this.dispatchEvent(new CustomEvent("internal-tab")):this.__setValue()}})),this.addEventListener("focusin",(()=>this.setAttribute("focused",""))),this.addEventListener("focusout",(e=>{const t=this.getRootNode().activeElement;this.inputs.some((e=>t===e||e.shadowRoot&&e.shadowRoot.contains(t)))||this.removeAttribute("focused")}));var t=B._uniqueId=1+B._uniqueId||1;this.__errorId=`${this.constructor.is}-error-${t}`,this.__labelId=`${this.constructor.is}-label-${t}`,this.__helperTextId=`${this.constructor.is}-helper-${t}`}focus(){this.inputs&&this.inputs[0]&&this.inputs[0].focus()}__updateValue(e){e&&e.stopPropagation(),this.__setValue(),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1,detail:{value:this.value}}))}__setValue(){this.__settingValue=!0,this.value=this.i18n.formatValue.apply(this,[this.inputs.map((e=>e.value))]),this.__settingValue=!1}__queryAllAssignedElements(e){const t=[];let a;return"SLOT"===e.tagName?a=e.assignedNodes({flatten:!0}).filter((e=>e.nodeType===Node.ELEMENT_NODE)):(t.push(e),a=Array.from(e.children)),a.forEach((e=>t.push(...this.__queryAllAssignedElements(e)))),t}__getInputsFromSlot(){return this.__queryAllAssignedElements(this.$.slot).filter((e=>e.validate||e.checkValidity))}__setInputsFromSlot(){this._setInputs(this.__getInputsFromSlot()),this.__setValue()}__valueChanged(e,t){if(this.__settingValue||!this.inputs)return;const a=this.i18n.parseValue(e);a&&0!=a.length?(this.inputs.forEach(((e,t)=>e.value=a[t])),void 0!==t&&this.validate()):console.warn("Value parser has not provided values array")}__onHelperSlotChange(){const e=this.$.helperSlot.assignedNodes({flatten:!0});this.__hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this.__hasSlottedHelper?this.setAttribute("has-helper","slotted"):""!==this.helperText&&null!==this.helperText||this.removeAttribute("has-helper")}}
|
|
259
|
-
/**
|
|
260
|
-
@license
|
|
261
|
-
Copyright (c) 2018 Vaadin Ltd.
|
|
262
|
-
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
263
|
-
*/;class R extends(s(B(r(o)))){static get template(){return n`
|
|
264
|
-
<style>
|
|
265
|
-
:host {
|
|
266
|
-
display: inline-flex;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
:host::before {
|
|
270
|
-
content: "\\2003";
|
|
271
|
-
width: 0;
|
|
272
|
-
display: inline-block;
|
|
273
|
-
/* Size and position this element on the same vertical position as the input-field element
|
|
274
|
-
to make vertical align for the host element work as expected */
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
:host([hidden]) {
|
|
278
|
-
display: none !important;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.container {
|
|
282
|
-
width: 100%;
|
|
283
|
-
display: flex;
|
|
284
|
-
flex-direction: column;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.inputs-wrapper {
|
|
288
|
-
flex: none;
|
|
289
|
-
}
|
|
290
|
-
</style>
|
|
291
|
-
|
|
292
|
-
<div class="container">
|
|
293
|
-
<label part="label" on-click="focus" id="[[__labelId]]">[[label]]</label>
|
|
294
|
-
<div class="inputs-wrapper" on-change="__updateValue">
|
|
295
|
-
<slot id="slot"></slot>
|
|
296
|
-
</div>
|
|
297
|
-
<div part="helper-text" id="[[__helperTextId]]">
|
|
298
|
-
<slot name="helper" id="helperSlot">[[helperText]]</slot>
|
|
299
|
-
</div>
|
|
300
|
-
<div part="error-message" id="[[__errorId]]" aria-live="assertive" aria-hidden\$="[[__getErrorMessageAriaHidden(invalid, errorMessage, __errorId)]]">[[errorMessage]]</div>
|
|
301
|
-
</div>
|
|
302
|
-
`}static get is(){return"vaadin-custom-field"}static get version(){return"1.3.0"}static get properties(){return{label:{type:String,value:"",observer:"_labelChanged"},name:String,required:{type:Boolean,reflectToAttribute:!0},value:{type:String,observer:"__valueChanged",notify:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1,observer:"__invalidChanged"},errorMessage:{type:String,value:"",observer:"__errorMessageChanged"},helperText:{type:String,value:"",observer:"__helperTextChanged"}}}static get observers(){return["__getActiveErrorId(invalid, errorMessage, __errorId, helperText, __helperTextId, __hasSlottedHelper)","__getActiveLabelId(label, __labelId)","__toggleHasValue(value)"]}__invalidChanged(e){this.__setOrToggleAttribute("aria-invalid",e,this)}__errorMessageChanged(e){this.__setOrToggleAttribute("has-error-message",!!e,this)}__helperTextChanged(e){this.__setOrToggleAttribute("has-helper",!!e,this)}__toggleHasValue(e){null!==e&&""!==e.trim()?this.setAttribute("has-value",""):this.removeAttribute("has-value")}_labelChanged(e){""!==e&&null!=e?this.setAttribute("has-label",""):this.removeAttribute("has-label")}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){return!(this.inputs.filter((e=>!(e.validate||e.checkValidity).call(e))).length||this.required&&!this.value.trim())}__setOrToggleAttribute(e,t,a){e&&a&&a.hasAttribute(e)===!t&&(t?a.setAttribute(e,"boolean"==typeof t?"":t):a.removeAttribute(e))}__getActiveErrorId(e,t,a,s,i,r){const l=[];(s||r)&&l.push(i),t&&e&&l.push(a),l.length>0?this.setAttribute("aria-describedby",l.join(" ")):this.removeAttribute("aria-describedby")}__getActiveLabelId(e,t){this.__setOrToggleAttribute("aria-labelledby",e?t:void 0,this)}__getErrorMessageAriaHidden(e,t,a){return(!(t&&e?a:void 0)).toString()}}customElements.define(R.is,R);class Y extends CustomEvent{constructor(e){super("change",{detail:e})}}class W extends Y{}let X,K,G=e=>e;class Z extends(g(e(c))){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:a}=v(e);return[t.toString(),a]}},this.__getItems=F((e=>{const t=v(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 t(t({},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 p(X||(X=G`: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 m(K||(K=G` <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,H(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 W(this.value))}}const J=L({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:"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:{}}}}}}}}}}}},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,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:P.assign({defaultCustomValue:(e,t)=>t.data}),setValue:P.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:P.assign({custom:(e,t)=>t.data}),setItems:P.assign({items:(e,t)=>t.data}),setType:P.assign({type:(e,t)=>t.data}),setMin:P.assign({min:(e,t)=>t.data}),setMax:P.assign({max:(e,t)=>t.data})}});let Q,ee,te,ae,se,ie,re,le,ne,oe,de,he,ue,ce=e=>e;const pe=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class me extends b{constructor(){super(...arguments),this.getText=e=>e,this.__service=q(J).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":Z,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,p(te||(te=ce`: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 t(t({},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,pe]:this.items,t=Array.isArray(this.value),a=this.__service.state.matches("extension.present.selected"),s=m(ae||(ae=ce` ${0} `),e.map(((e,s,i)=>{var r;const l=this.custom&&s===i.length-1,n=l?a:t?!!(null===(r=this.value)||void 0===r?void 0:r.includes(e)):e===String(this.value),o=this.disabled||!this._isI18nReady,d=j({value:l?pe:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":o,"@change":t=>{if(this.readonly)return t.preventDefault();const a=t.target.checked,s=e===pe?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===pe?a?[...i,s]:i.slice(0,i.length-1):a?[s,...i]:i.filter((e=>e!==s)):this.value=a?s:null,this.dispatchEvent(new N(this.value))}}),h=m(se||(se=ce` <div> ${0} </div> `),e===pe?this._t("choice.other").toString():m(ie||(ie=ce`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return m(re||(re=ce` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),s?"":"hidden",t?function(e,t,a,s,i){const r="transition ease-in-out duration-200",l=`${r} transform ${a?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return m(ee||(ee=ce` <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"),r,e?"":t?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",l,a,s,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,n,d,h):function(e,t,a,s,i){const r="transition ease-in-out duration-200",l=`${r} ${t||e?"":"shadow-xs"} transform ${a?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return m(Q||(Q=ce` <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"),r,e?"":t?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",l,a,s,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,n,d,h),e===pe&&a?this.__field:"",e!==pe?m(le||(le=ce`<slot name="${0}"></slot>`),e):"")})));return m(ne||(ne=ce`<form>${0}</form> `),s)}get __field(){const e=j({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 N(this.value))}});return"frequency"===this.type?m(oe||(oe=ce`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?m(de||(de=ce`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"textarea"===this.type?m(he||(he=ce`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):m(ue||(ue=ce`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}export{me as C,Y as D,Z as F,R as a,N as b,P as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as r}from"./shared-fadcb2e1.js";import{p as s}from"./shared-c309e0ef.js";function e(e){var t;const a=s(e),n=null!==(t={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[a.units])&&void 0!==t?t:a.units;return r(r({},a),{},{units:n})}export{e as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-d28ac9dc.js";import{a as e}from"./shared-8d4fef94.js";import{_ as t}from"./shared-fadcb2e1.js";import{i as r}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";class l extends e{constructor(){super(...arguments),this.__placeholder=null,this.__helperText=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return t(t({},super.properties),{},{placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){this.requestUpdate("placeholder",this.__placeholder),this.__placeholder=e}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){this.requestUpdate("helperText",this.__helperText),this.__helperText=e}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){this.requestUpdate("v8nPrefix",this.__v8nPrefix),this.__v8nPrefix=e}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){this.requestUpdate("property",this.__property),this.__property=e}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){this.requestUpdate("label",this.__label),this.__label=e}resetPlaceholder(){this.requestUpdate("placeholder",this.__placeholder),this.__placeholder=null}resetHelperText(){this.requestUpdate("helperText",this.__helperText),this.__helperText=null}resetV8nPrefix(){this.requestUpdate("v8nPrefix",this.__v8nPrefix),this.__v8nPrefix=null}resetProperty(){this.requestUpdate("property",this.__property),this.__property=null}resetLabel(){this.requestUpdate("label",this.__label),this.__label=null}get _value(){var e;return null===(e=this.nucleon)||void 0===e?void 0:e.form[this.property]}set _value(e){var t;const r=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(r)&&(null===(t=this.nucleon)||void 0===t||t.edit({[this.property]:e}))}get _error(){var e;return null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)))}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",l);let i,h=e=>e;customElements.define("foxy-internal-text-control",class extends l{renderControl(){return s(i||(i=h` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> `),r(this._errorMessage),this.helperText,this.placeholder,this.label,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}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});export{l as I};
|