@foxy.io/elements 1.29.0-beta.6 → 1.30.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-form.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-form.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-cart-form.js +2 -2
- package/dist/cdn/foxy-client-form.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-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-form.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-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-form.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-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-editor.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +3 -3
- 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-form.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-report-form.js +1 -1
- package/dist/cdn/foxy-sign-in-form.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-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-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-update-payment-method-form.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/{shared-cfb33387.js → shared-01f18104.js} +1 -1
- package/dist/cdn/{shared-3483c729.js → shared-09fc6fa0.js} +1 -1
- package/dist/cdn/{shared-8bb3eb45.js → shared-1729e19a.js} +1 -1
- package/dist/cdn/{shared-fe4a2e3d.js → shared-19f46691.js} +1 -1
- package/dist/cdn/{shared-38f0bda5.js → shared-2bd96ec7.js} +2 -2
- package/dist/cdn/{shared-a97c3129.js → shared-2d75f154.js} +1 -1
- package/dist/cdn/{shared-8526ed32.js → shared-3b975a29.js} +1 -1
- package/dist/cdn/{shared-ae00ce7c.js → shared-3cf043a7.js} +1 -1
- package/dist/cdn/{shared-0ad0fb9f.js → shared-41e7554e.js} +1 -1
- package/dist/cdn/{shared-ee2cda29.js → shared-471e77dd.js} +1 -1
- package/dist/cdn/{shared-1467a889.js → shared-476827c7.js} +1 -1
- package/dist/cdn/{shared-75331d5e.js → shared-4a652d60.js} +1 -1
- package/dist/cdn/{shared-22ba950a.js → shared-4d172731.js} +1 -1
- package/dist/cdn/{shared-70747a5c.js → shared-5721fb53.js} +1 -1
- package/dist/cdn/{shared-376784f0.js → shared-5bc86d84.js} +1 -1
- package/dist/cdn/shared-6d11abd7.js +280 -0
- package/dist/cdn/{shared-13203be0.js → shared-6f4fa343.js} +1 -1
- package/dist/cdn/{shared-f21254a3.js → shared-6f877b15.js} +1 -1
- package/dist/cdn/{shared-d0e4d7b1.js → shared-73045804.js} +1 -1
- package/dist/cdn/{shared-f4abc29a.js → shared-787e8da4.js} +1 -1
- package/dist/cdn/{shared-9a22d597.js → shared-7dd710e4.js} +1 -1
- package/dist/cdn/{shared-970d98db.js → shared-8fbebf38.js} +1 -1
- package/dist/cdn/{shared-cc808e01.js → shared-9637a2de.js} +1 -1
- package/dist/cdn/{shared-dfc47fd9.js → shared-96a392d9.js} +1 -1
- package/dist/cdn/{shared-4f183419.js → shared-97514fcb.js} +1 -1
- package/dist/cdn/{shared-c9845b4a.js → shared-9bf7d9a7.js} +1 -1
- package/dist/cdn/{shared-421a3ced.js → shared-a0efdc94.js} +1 -1
- package/dist/cdn/{shared-32e92c3b.js → shared-a8233033.js} +1 -1
- package/dist/cdn/{shared-edae6816.js → shared-ad76e640.js} +1 -1
- package/dist/cdn/{shared-6a8a40cc.js → shared-b38762ef.js} +1 -1
- package/dist/cdn/{shared-ce0465c6.js → shared-b980ba1d.js} +1 -1
- package/dist/cdn/{shared-afd7214a.js → shared-cb3b9d8b.js} +1 -1
- package/dist/cdn/{shared-ecf479f2.js → shared-d5ff9121.js} +1 -1
- package/dist/cdn/{shared-1ecfa77b.js → shared-deff3eda.js} +1 -1
- package/dist/cdn/{shared-301a779e.js → shared-e47bd38e.js} +1 -1
- package/dist/cdn/{shared-dbda59a0.js → shared-e5098b19.js} +1 -1
- package/dist/cdn/{shared-19768452.js → shared-e7bff5de.js} +1 -1
- package/dist/cdn/{shared-e4870c47.js → shared-ea5ff8bc.js} +1 -1
- package/dist/cdn/translations/admin-subscription-form/en.json +108 -0
- package/dist/cdn/translations/coupon-form/en.json +103 -50
- package/dist/cdn/translations/transaction/en.json +108 -0
- package/dist/cdn/translations/webhook-card/en.json +5 -1
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +9 -2
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +150 -32
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
- package/dist/elements/internal/InternalAsyncListControl/index.d.ts +3 -0
- package/dist/elements/internal/InternalAsyncListControl/index.js +3 -0
- package/dist/elements/internal/InternalAsyncListControl/index.js.map +1 -1
- package/dist/elements/internal/InternalAsyncListControl/styles.d.ts +1 -0
- package/dist/elements/internal/InternalAsyncListControl/styles.js +12 -0
- package/dist/elements/internal/InternalAsyncListControl/styles.js.map +1 -0
- package/dist/elements/internal/InternalAsyncListControl/types.d.ts +5 -1
- package/dist/elements/internal/InternalAsyncListControl/types.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.d.ts +0 -3
- package/dist/elements/public/CouponForm/CouponForm.js +56 -76
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/CouponForm/index.d.ts +2 -2
- package/dist/elements/public/CouponForm/index.js +2 -2
- package/dist/elements/public/CouponForm/index.js.map +1 -1
- package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
- package/dist/elements/public/Transaction/Transaction.d.ts +2 -0
- package/dist/elements/public/Transaction/Transaction.js +114 -19
- package/dist/elements/public/Transaction/Transaction.js.map +1 -1
- package/dist/elements/public/Transaction/index.d.ts +6 -0
- package/dist/elements/public/Transaction/index.js +6 -0
- package/dist/elements/public/Transaction/index.js.map +1 -1
- package/dist/elements/public/WebhookCard/WebhookCard.d.ts +8 -0
- package/dist/elements/public/WebhookCard/WebhookCard.js +73 -6
- package/dist/elements/public/WebhookCard/WebhookCard.js.map +1 -1
- package/dist/elements/public/WebhookCard/index.d.ts +2 -0
- package/dist/elements/public/WebhookCard/index.js +2 -0
- package/dist/elements/public/WebhookCard/index.js.map +1 -1
- package/dist/elements/public/WebhookForm/WebhookForm.d.ts +7 -0
- package/dist/elements/public/WebhookForm/WebhookForm.js +40 -4
- package/dist/elements/public/WebhookForm/WebhookForm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-ba7354fa.js +0 -6
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import"./shared-fb1602a2.js";import{h as t,P as e}from"./shared-98ddb87c.js";import{F as i,t as o}from"./shared-887e1795.js";import{T as n,a,E as r}from"./shared-2bd96ec7.js";import"./shared-3cf043a7.js";import{O as s}from"./shared-9bf7d9a7.js";import"./shared-9637a2de.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-49ecea83.js";import{I as l}from"./shared-226dd830.js";import"./shared-09fc6fa0.js";import{w as d}from"./shared-25502f01.js";import{c,h,r as m}from"./shared-dc73b9a5.js";import{_ as u}from"./shared-0f6e4584.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
|
+
<template>
|
|
3
|
+
<style>
|
|
4
|
+
:host {
|
|
5
|
+
position: relative;
|
|
6
|
+
margin: var(--lumo-space-s);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
[part="overlay"] {
|
|
10
|
+
background: var(--lumo-base-color) linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
|
|
11
|
+
border-radius: var(--lumo-border-radius);
|
|
12
|
+
box-shadow: 0 0 0 1px var(--lumo-contrast-10pct), var(--lumo-box-shadow-l);
|
|
13
|
+
font-family: var(--lumo-font-family);
|
|
14
|
+
font-size: var(--lumo-font-size-m);
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
line-height: var(--lumo-line-height-s);
|
|
17
|
+
letter-spacing: 0;
|
|
18
|
+
text-transform: none;
|
|
19
|
+
-webkit-text-size-adjust: 100%;
|
|
20
|
+
-webkit-font-smoothing: antialiased;
|
|
21
|
+
-moz-osx-font-smoothing: grayscale;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[part="content"] {
|
|
25
|
+
padding: var(--lumo-space-wide-l);
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[part="content"] ::slotted(vaadin-button) {
|
|
32
|
+
flex: none;
|
|
33
|
+
margin: 0 calc(var(--lumo-space-s) * -1) 0 var(--lumo-space-m);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([slot^="middle"]) {
|
|
37
|
+
width: 20em;
|
|
38
|
+
max-width: 80vw;
|
|
39
|
+
margin: var(--lumo-space-s) auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([slot\$="stretch"]) {
|
|
43
|
+
margin: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host([slot\$="stretch"]) [part="overlay"] {
|
|
47
|
+
border-radius: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (min-width: 421px) {
|
|
51
|
+
:host(:not([slot\$="stretch"])) {
|
|
52
|
+
display: flex;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([slot\$="end"]) {
|
|
56
|
+
justify-content: flex-end;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([slot^="middle"]),
|
|
60
|
+
:host([slot\$="center"]) {
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes lumo-notification-exit-fade-out {
|
|
67
|
+
100% {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@keyframes lumo-notification-enter-fade-in {
|
|
73
|
+
0% {
|
|
74
|
+
opacity: 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes lumo-notification-enter-slide-down {
|
|
79
|
+
0% {
|
|
80
|
+
transform: translateY(-200%);
|
|
81
|
+
opacity: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@keyframes lumo-notification-exit-slide-up {
|
|
86
|
+
100% {
|
|
87
|
+
transform: translateY(-200%);
|
|
88
|
+
opacity: 0;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes lumo-notification-enter-slide-up {
|
|
93
|
+
0% {
|
|
94
|
+
transform: translateY(200%);
|
|
95
|
+
opacity: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes lumo-notification-exit-slide-down {
|
|
100
|
+
100% {
|
|
101
|
+
transform: translateY(200%);
|
|
102
|
+
opacity: 0;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([slot="middle"][opening]) {
|
|
107
|
+
animation: lumo-notification-enter-fade-in 300ms;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:host([slot="middle"][closing]) {
|
|
111
|
+
animation: lumo-notification-exit-fade-out 300ms;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host([slot^="top"][opening]) {
|
|
115
|
+
animation: lumo-notification-enter-slide-down 300ms;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:host([slot^="top"][closing]) {
|
|
119
|
+
animation: lumo-notification-exit-slide-up 300ms;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:host([slot^="bottom"][opening]) {
|
|
123
|
+
animation: lumo-notification-enter-slide-up 300ms;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:host([slot^="bottom"][closing]) {
|
|
127
|
+
animation: lumo-notification-exit-slide-down 300ms;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:host([theme~="primary"]) [part="overlay"] {
|
|
131
|
+
background: var(--lumo-primary-color);
|
|
132
|
+
color: var(--lumo-primary-contrast-color);
|
|
133
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:host([theme~="primary"]) {
|
|
137
|
+
--_lumo-button-background-color: var(--lumo-shade-20pct);
|
|
138
|
+
--_lumo-button-color: var(--lumo-primary-contrast-color);
|
|
139
|
+
--_lumo-button-primary-background-color: var(--lumo-primary-contrast-color);
|
|
140
|
+
--_lumo-button-primary-color: var(--lumo-primary-text-color);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:host([theme~="contrast"]) [part="overlay"] {
|
|
144
|
+
background: var(--lumo-contrast);
|
|
145
|
+
color: var(--lumo-base-color);
|
|
146
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:host([theme~="contrast"]) {
|
|
150
|
+
--_lumo-button-background-color: var(--lumo-contrast-20pct);
|
|
151
|
+
--_lumo-button-color: var(--lumo-base-color);
|
|
152
|
+
--_lumo-button-primary-background-color: var(--lumo-base-color);
|
|
153
|
+
--_lumo-button-primary-color: var(--lumo-contrast);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:host([theme~="success"]) [part="overlay"] {
|
|
157
|
+
background: var(--lumo-success-color);
|
|
158
|
+
color: var(--lumo-success-contrast-color);
|
|
159
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([theme~="success"]) {
|
|
163
|
+
--_lumo-button-background-color: var(--lumo-shade-20pct);
|
|
164
|
+
--_lumo-button-color: var(--lumo-success-contrast-color);
|
|
165
|
+
--_lumo-button-primary-background-color: var(--lumo-success-contrast-color);
|
|
166
|
+
--_lumo-button-primary-color: var(--lumo-success-text-color);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:host([theme~="error"]) [part="overlay"] {
|
|
170
|
+
background: var(--lumo-error-color);
|
|
171
|
+
color: var(--lumo-error-contrast-color);
|
|
172
|
+
box-shadow: var(--lumo-box-shadow-l);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host([theme~="error"]) {
|
|
176
|
+
--_lumo-button-background-color: var(--lumo-shade-20pct);
|
|
177
|
+
--_lumo-button-color: var(--lumo-error-contrast-color);
|
|
178
|
+
--_lumo-button-primary-background-color: var(--lumo-error-contrast-color);
|
|
179
|
+
--_lumo-button-primary-color: var(--lumo-error-text-color);
|
|
180
|
+
}
|
|
181
|
+
</style>
|
|
182
|
+
</template>
|
|
183
|
+
</dom-module>`;document.head.appendChild(f.content);
|
|
184
|
+
/**
|
|
185
|
+
@license
|
|
186
|
+
Copyright (c) 2017 Vaadin Ltd.
|
|
187
|
+
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
188
|
+
*/
|
|
189
|
+
class v extends(n(r(e))){static get template(){return t`
|
|
190
|
+
<style>
|
|
191
|
+
:host {
|
|
192
|
+
position: fixed;
|
|
193
|
+
z-index: 1000;
|
|
194
|
+
top: 0;
|
|
195
|
+
left: 0;
|
|
196
|
+
bottom: 0;
|
|
197
|
+
right: 0;
|
|
198
|
+
box-sizing: border-box;
|
|
199
|
+
|
|
200
|
+
display: flex;
|
|
201
|
+
flex-direction: column;
|
|
202
|
+
align-items: stretch;
|
|
203
|
+
pointer-events: none;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[region-group] {
|
|
207
|
+
flex: 1 1 0%;
|
|
208
|
+
display: flex;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
[region-group="top"] {
|
|
212
|
+
align-items: flex-start;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
[region-group="bottom"] {
|
|
216
|
+
align-items: flex-end;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[region-group] > [region] {
|
|
220
|
+
flex: 1 1 0%;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@media (max-width: 420px) {
|
|
224
|
+
[region-group] {
|
|
225
|
+
flex-direction: column;
|
|
226
|
+
align-items: stretch;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
[region-group="top"] {
|
|
230
|
+
justify-content: flex-start;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
[region-group="bottom"] {
|
|
234
|
+
justify-content: flex-end;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
[region-group] > [region] {
|
|
238
|
+
flex: initial;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
</style>
|
|
242
|
+
|
|
243
|
+
<div region="top-stretch"><slot name="top-stretch"></slot></div>
|
|
244
|
+
<div region-group="top">
|
|
245
|
+
<div region="top-start"><slot name="top-start"></slot></div>
|
|
246
|
+
<div region="top-center"><slot name="top-center"></slot></div>
|
|
247
|
+
<div region="top-end"><slot name="top-end"></slot></div>
|
|
248
|
+
</div>
|
|
249
|
+
<div region="middle"><slot name="middle"></slot></div>
|
|
250
|
+
<div region-group="bottom">
|
|
251
|
+
<div region="bottom-start"><slot name="bottom-start"></slot></div>
|
|
252
|
+
<div region="bottom-center"><slot name="bottom-center"></slot></div>
|
|
253
|
+
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
254
|
+
</div>
|
|
255
|
+
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
256
|
+
`}static get is(){return"vaadin-notification-container"}static get properties(){return{opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener))}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),/iPad|iPhone|iPod/.test(navigator.userAgent)&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}_detectIosNavbar(){const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.bottom=e&&i>t?i-t+"px":"0"}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault()}}class g extends(n(e)){static get template(){return t`
|
|
257
|
+
<style>
|
|
258
|
+
:host {
|
|
259
|
+
display: block;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
[part="overlay"] {
|
|
263
|
+
pointer-events: auto;
|
|
264
|
+
}
|
|
265
|
+
</style>
|
|
266
|
+
|
|
267
|
+
<div part="overlay">
|
|
268
|
+
<div part="content">
|
|
269
|
+
<slot></slot>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
`}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class y extends(a(r(e))){static get template(){return t`
|
|
273
|
+
<style>
|
|
274
|
+
:host {
|
|
275
|
+
display: none;
|
|
276
|
+
}
|
|
277
|
+
</style>
|
|
278
|
+
<vaadin-notification-card id="vaadin-notification-card" theme\$="[[theme]]">
|
|
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 mb-xs text-s font-medium"> <span class="text-secondary mr-auto"> ${0} </span> ${0} ${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="${0}" ?hidden="${0}"> ${0} </div> <div class="mt-xs text-xs 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)})),p(n),_({"block divide-y divide-contrast-5 rounded overflow-hidden":!0,"ring-1 ring-inset ring-contrast-10":this.__isSelecting||!this.form&&!this.getPageHref,"bg-contrast-5":!(this.__isSelecting||!this.form&&!this.getPageHref)}),this.related,this.itemProps,this.__itemRenderer,_({"transition-colors mt-xs text-xs":!0,"text-secondary group-hover-text-body":!this.disabled&&!this.readonly,"text-disabled":this.disabled}),!this.helperText||"helper_text"===this.helperText,this.helperText,!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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as t}from"./shared-98ddb87c.js";import{T as e}from"./shared-
|
|
1
|
+
import{h as t}from"./shared-98ddb87c.js";import{T as e}from"./shared-19f46691.js";import{D as l}from"./shared-25502f01.js";const r=t`<dom-module id="lumo-email-field" theme-for="vaadin-email-field">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:not(*):placeholder-shown, /* to prevent broken styles on IE */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-ad76e640.js";import"./shared-19f46691.js";import"./shared-6f4fa343.js";import"./shared-e47bd38e.js";import"./shared-8fbebf38.js";import{I as e}from"./shared-226dd830.js";import{_ as t}from"./shared-0f6e4584.js";import{c as i,h as a,s}from"./shared-dc73b9a5.js";import{i as l}from"./shared-9803aa7c.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`: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}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <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"> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> </div> `),this.label,this.helperText,this.disabled||this.readonly,this._errorMessage,this.placeholder,o({"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}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget;this._value=this.__i18n.formatValue([t.value,r])}),o({"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}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<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>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-1729e19a.js";import{I as e}from"./shared-226dd830.js";import"./shared-49ecea83.js";import{_ as t}from"./shared-0f6e4584.js";import{h as s,s as i}from"./shared-dc73b9a5.js";import{c as r}from"./shared-4e709717.js";let l,o,a,h,c,n,d=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.helperTextAsToolip=!1,this.invert=!1}static get properties(){return t(t({},super.properties),{},{helperTextAsToolip:{type:Boolean,attribute:"helper-text-as-tooltip"},invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return s(l||(l=d` <div class="flex items-start gap-s leading-xs text-m"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> ${0} <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(o||(o=d`<p class="text-xs text-secondary">${0}</p>`),this.helperText),this.disabled||this.readonly,this._errorMessage,this.readonly?s(a||(a=d`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):s(h||(h=d` <div style="height:calc(1em * var(--lumo-line-height-xs))" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((1em * var(--lumo-line-height-xs)) - 3px + var(--lumo-space-m))" class="${0}" @click="${0}"> <div style="margin:1.5px;width:calc((1em * var(--lumo-line-height-xs)) - 6px);height:calc((1em * var(--lumo-line-height-xs)) - 6px)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),r({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),r({"transition-all transform block rounded-full":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})),this.helperTextAsToolip&&this.helperText?s(c||(c=d` <div class="transition-colors text-tertiary flex-shrink-0 cursor-pointer hover-text-body" id="trigger"> ${0} </div> <vcf-tooltip for="trigger" style="--lumo-base-color:black;max-width:30rem" class="mt-s" theme="light" position="bottom"> <span class="text-s" style="color:#fff">${0}</span> </vcf-tooltip> `),i(n||(n=d`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: calc(1em * var(--lumo-line-height-xs)); height: calc(1em * var(--lumo-line-height-xs)); margin-right: -0.12em"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),this.helperText):"")}});
|