@foxy.io/elements 1.13.0 → 1.14.0-beta.12

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.
Files changed (180) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  3. package/dist/cdn/foxy-address-card.js +1 -1
  4. package/dist/cdn/foxy-address-form.js +1 -1
  5. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-card.js +1 -1
  7. package/dist/cdn/foxy-attribute-form.js +1 -1
  8. package/dist/cdn/foxy-cancellation-form.js +1 -1
  9. package/dist/cdn/foxy-collection-page.js +1 -1
  10. package/dist/cdn/foxy-collection-pages.js +1 -1
  11. package/dist/cdn/foxy-custom-field-card.js +1 -1
  12. package/dist/cdn/foxy-custom-field-form.js +1 -1
  13. package/dist/cdn/foxy-customer-api.js +1 -1
  14. package/dist/cdn/foxy-customer-card.js +1 -1
  15. package/dist/cdn/foxy-customer-form.js +1 -1
  16. package/dist/cdn/foxy-customer-portal-settings.js +18 -18
  17. package/dist/cdn/foxy-customer-portal.js +18 -15
  18. package/dist/cdn/foxy-customer.js +4 -4
  19. package/dist/cdn/foxy-customers-table.js +1 -1
  20. package/dist/cdn/foxy-discount-card.js +1 -1
  21. package/dist/cdn/foxy-donation.js +1 -1
  22. package/dist/cdn/foxy-email-template-form.js +1 -0
  23. package/dist/cdn/foxy-error-entry-card.js +1 -1
  24. package/dist/cdn/foxy-form-dialog.js +1 -1
  25. package/dist/cdn/foxy-i18n.js +1 -1
  26. package/dist/cdn/foxy-items-form.js +1 -1
  27. package/dist/cdn/foxy-nucleon-element.js +1 -1
  28. package/dist/cdn/foxy-payment-card.js +1 -1
  29. package/dist/cdn/foxy-payment-method-card.js +1 -1
  30. package/dist/cdn/foxy-query-builder.js +1 -1
  31. package/dist/cdn/foxy-sign-in-form.js +1 -1
  32. package/dist/cdn/foxy-spinner.js +2 -2
  33. package/dist/cdn/foxy-subscription-card.js +1 -1
  34. package/dist/cdn/foxy-subscription-form.js +26 -9
  35. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  36. package/dist/cdn/foxy-table.js +1 -1
  37. package/dist/cdn/foxy-tax-card.js +1 -1
  38. package/dist/cdn/foxy-tax-form.js +1 -1
  39. package/dist/cdn/foxy-template-config-form.js +1 -0
  40. package/dist/cdn/foxy-template-form.js +1 -0
  41. package/dist/cdn/foxy-transaction-card.js +1 -1
  42. package/dist/cdn/foxy-transactions-table.js +1 -1
  43. package/dist/cdn/foxy-user-form.js +1 -1
  44. package/dist/cdn/foxy-users-table.js +1 -1
  45. package/dist/cdn/{shared-d4dad105.js → shared-00563cb0.js} +1 -1
  46. package/dist/cdn/shared-07134f93.js +14 -0
  47. package/dist/cdn/{shared-b0b1d248.js → shared-07abcd7b.js} +1 -1
  48. package/dist/cdn/shared-0ced76a0.js +358 -0
  49. package/dist/cdn/{shared-f4119f12.js → shared-16f72e27.js} +1 -1
  50. package/dist/cdn/shared-1761daef.js +15 -0
  51. package/dist/cdn/{shared-5fedf5e4.js → shared-200f613b.js} +2 -2
  52. package/dist/cdn/{shared-4059f633.js → shared-218ba06e.js} +1 -1
  53. package/dist/cdn/{shared-f2cf6cfb.js → shared-322e60b1.js} +1 -1
  54. package/dist/cdn/{shared-e9920617.js → shared-34b2c1e2.js} +1 -1
  55. package/dist/cdn/shared-35dbd2c5.js +1 -0
  56. package/dist/cdn/{shared-cf248335.js → shared-44cfc617.js} +1 -1
  57. package/dist/cdn/{shared-45d647e4.js → shared-46ee137f.js} +1 -1
  58. package/dist/cdn/{shared-f0199313.js → shared-593f7e2c.js} +1 -1
  59. package/dist/cdn/shared-59e44f29.js +1 -0
  60. package/dist/cdn/{shared-f47647ac.js → shared-5c8b531d.js} +1 -1
  61. package/dist/cdn/{shared-91a9e922.js → shared-5f54e916.js} +4 -4
  62. package/dist/cdn/{shared-cd700eac.js → shared-60126eee.js} +1 -1
  63. package/dist/cdn/{shared-17968c53.js → shared-63eaded9.js} +3 -3
  64. package/dist/cdn/shared-6b7602c7.js +1 -0
  65. package/dist/cdn/{shared-98ee7fad.js → shared-6d45a07b.js} +1 -1
  66. package/dist/cdn/{shared-145cc9eb.js → shared-7a42073a.js} +5 -5
  67. package/dist/cdn/{shared-b77179fd.js → shared-8a7bee0d.js} +1 -1
  68. package/dist/cdn/{shared-a99dea97.js → shared-91e768be.js} +1 -1
  69. package/dist/cdn/{shared-84fa75d9.js → shared-9221e6b2.js} +1 -1
  70. package/dist/cdn/{shared-2860a3d3.js → shared-94b0ae99.js} +2 -2
  71. package/dist/cdn/shared-9a40309d.js +1 -0
  72. package/dist/cdn/shared-a46edf4b.js +1 -0
  73. package/dist/cdn/{shared-54702b33.js → shared-b0f0e8b5.js} +1 -1
  74. package/dist/cdn/shared-b5147166.js +314 -0
  75. package/dist/cdn/{shared-ed4ed7a5.js → shared-b710881a.js} +2 -2
  76. package/dist/cdn/{shared-3ae39e52.js → shared-bb824ab4.js} +3 -3
  77. package/dist/cdn/{shared-67157a25.js → shared-bc2bfe52.js} +1 -1
  78. package/dist/cdn/{shared-d9159fe1.js → shared-ce1da35d.js} +1 -1
  79. package/dist/cdn/shared-d01d809a.js +1 -0
  80. package/dist/cdn/shared-d8ffb279.js +264 -0
  81. package/dist/cdn/shared-df573cea.js +12 -0
  82. package/dist/cdn/{shared-036a8b21.js → shared-e5cbf291.js} +1 -1
  83. package/dist/cdn/{shared-e5de8675.js → shared-e7f8ffe9.js} +1 -1
  84. package/dist/cdn/{shared-54c485d2.js → shared-ec861f31.js} +21 -21
  85. package/dist/cdn/{shared-e0248713.js → shared-f0a83bd6.js} +1 -1
  86. package/dist/cdn/shared-f1dc1c6c.js +1 -0
  87. package/dist/cdn/{shared-747b0842.js → shared-ff79f3f9.js} +1 -1
  88. package/dist/cdn/translations/shared/de.json +94 -0
  89. package/dist/cdn/translations/shared/en.json +93 -0
  90. package/dist/cdn/translations/shared/es.json +93 -0
  91. package/dist/elements/private/Checkbox/Checkbox.d.ts +3 -1
  92. package/dist/elements/private/Checkbox/Checkbox.js +45 -12
  93. package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
  94. package/dist/elements/private/Choice/Choice.js +9 -9
  95. package/dist/elements/private/Choice/Choice.js.map +1 -1
  96. package/dist/elements/private/Group/Group.js +1 -1
  97. package/dist/elements/private/Group/Group.js.map +1 -1
  98. package/dist/elements/private/I18N/I18N.js +1 -1
  99. package/dist/elements/private/I18N/I18N.js.map +1 -1
  100. package/dist/elements/public/AddressForm/AddressForm.js +8 -4
  101. package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
  102. package/dist/elements/public/AttributeForm/AttributeForm.js +8 -4
  103. package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
  104. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +8 -4
  105. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
  106. package/dist/elements/public/CustomerForm/CustomerForm.js +8 -4
  107. package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
  108. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.d.ts +1 -0
  109. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js +17 -8
  110. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js.map +1 -1
  111. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +11 -3
  112. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
  113. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +46 -0
  114. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +350 -0
  115. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -0
  116. package/dist/elements/public/EmailTemplateForm/index.d.ts +9 -0
  117. package/dist/elements/public/EmailTemplateForm/index.js +11 -0
  118. package/dist/elements/public/EmailTemplateForm/index.js.map +1 -0
  119. package/dist/elements/public/EmailTemplateForm/types.d.ts +17 -0
  120. package/dist/elements/public/EmailTemplateForm/types.js +2 -0
  121. package/dist/elements/public/EmailTemplateForm/types.js.map +1 -0
  122. package/dist/elements/public/ItemsForm/ItemsForm.js +2 -2
  123. package/dist/elements/public/ItemsForm/ItemsForm.js.map +1 -1
  124. package/dist/elements/public/ItemsForm/private/Picture.d.ts +1 -0
  125. package/dist/elements/public/ItemsForm/private/Picture.js +2 -0
  126. package/dist/elements/public/ItemsForm/private/Picture.js.map +1 -1
  127. package/dist/elements/public/NucleonElement/serveFromCache.js +1 -0
  128. package/dist/elements/public/NucleonElement/serveFromCache.js.map +1 -1
  129. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +12 -4
  130. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
  131. package/dist/elements/public/TaxForm/TaxForm.js +8 -4
  132. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  133. package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +21 -0
  134. package/dist/elements/public/TemplateConfigForm/CountriesList.js +137 -0
  135. package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +1 -0
  136. package/dist/elements/public/TemplateConfigForm/CountryCard.d.ts +20 -0
  137. package/dist/elements/public/TemplateConfigForm/CountryCard.js +160 -0
  138. package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +1 -0
  139. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +88 -0
  140. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +1333 -0
  141. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -0
  142. package/dist/elements/public/TemplateConfigForm/defaults.d.ts +2 -0
  143. package/dist/elements/public/TemplateConfigForm/defaults.js +95 -0
  144. package/dist/elements/public/TemplateConfigForm/defaults.js.map +1 -0
  145. package/dist/elements/public/TemplateConfigForm/index.d.ts +9 -0
  146. package/dist/elements/public/TemplateConfigForm/index.js +11 -0
  147. package/dist/elements/public/TemplateConfigForm/index.js.map +1 -0
  148. package/dist/elements/public/TemplateConfigForm/types.d.ts +150 -0
  149. package/dist/elements/public/TemplateConfigForm/types.js +2 -0
  150. package/dist/elements/public/TemplateConfigForm/types.js.map +1 -0
  151. package/dist/elements/public/TemplateForm/TemplateForm.d.ts +45 -0
  152. package/dist/elements/public/TemplateForm/TemplateForm.js +343 -0
  153. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -0
  154. package/dist/elements/public/TemplateForm/index.d.ts +9 -0
  155. package/dist/elements/public/TemplateForm/index.js +11 -0
  156. package/dist/elements/public/TemplateForm/index.js.map +1 -0
  157. package/dist/elements/public/TemplateForm/types.d.ts +17 -0
  158. package/dist/elements/public/TemplateForm/types.js +2 -0
  159. package/dist/elements/public/TemplateForm/types.js.map +1 -0
  160. package/dist/elements/public/index.d.ts +3 -0
  161. package/dist/elements/public/index.defined.d.ts +3 -0
  162. package/dist/elements/public/index.defined.js +3 -0
  163. package/dist/elements/public/index.defined.js.map +1 -1
  164. package/dist/elements/public/index.js +3 -0
  165. package/dist/elements/public/index.js.map +1 -1
  166. package/dist/mixins/themeable.js +143 -24
  167. package/dist/mixins/themeable.js.map +1 -1
  168. package/dist/mixins/translatable.js +1 -1
  169. package/dist/mixins/translatable.js.map +1 -1
  170. package/package.json +2 -7
  171. package/dist/cdn/shared-296637c5.js +0 -1
  172. package/dist/cdn/shared-4a990126.js +0 -1
  173. package/dist/cdn/shared-50744508.js +0 -15
  174. package/dist/cdn/shared-b98f88c9.js +0 -369
  175. package/dist/cdn/shared-bf09e011.js +0 -572
  176. package/dist/cdn/shared-c0161e6a.js +0 -1
  177. package/dist/cdn/shared-c1e0e11f.js +0 -1
  178. package/dist/cdn/shared-dbcffd8e.js +0 -1
  179. package/dist/cdn/shared-e21a2aac.js +0 -1
  180. package/dist/cdn/shared-e55b6bb7.js +0 -1
@@ -0,0 +1,264 @@
1
+ import{k as e,P as t,A as a,L as i,j as s,h as n,_ as r}from"./shared-63eaded9.js";import"./shared-46ee137f.js";import{E as l,C as o,T as d}from"./shared-df573cea.js";import"./shared-f0a83bd6.js";import{a as u,T as h}from"./shared-bb824ab4.js";import{h as c,P as p,D as m}from"./shared-ff79f3f9.js";import"./shared-ec861f31.js";import"./foxy-i18n.js";import{Q as g,T as v,U as f,V as y,W as _,X as b,Y as x,Z as w,b as C,$ as E,a0 as k,a1 as T,a2 as $,a3 as V,a4 as S,a5 as I,m as A,a6 as M}from"./shared-1761daef.js";import{p as D}from"./shared-87ca7818.js";import{c as q}from"./shared-9a40309d.js";import{s as L}from"./shared-b0f0e8b5.js";import{i as N}from"./shared-a46edf4b.js";var B={raise:g,send:v,sendParent:f,sendUpdate:y,log:_,cancel:b,start:x,stop:w,assign:C,after:E,done:k,respond:T,forwardTo:$,escalate:V,choose:S,pure:I};const j=c`<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(j.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 P extends(l(u(o(d(p))))){static get template(){return c`
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]]">
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.0"}static get properties(){return{pattern:{type:String}}}static get observers(){return["_textAreaValueChanged(value)"]}ready(){super.ready(),this._updateHeight(),this.addEventListener("animationend",this._onAnimationEnd)}_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,i=this.value?this.value.length:0;if(this._oldValueLength>=i){const t=getComputedStyle(e).height,i=getComputedStyle(a).width;e.style.display="block",e.style.height=t,a.style.maxWidth=i,a.style.height="auto"}this._oldValueLength=i;const s=a.scrollHeight;s>a.clientHeight&&(a.style.height=s+"px"),a.style.removeProperty("max-width"),e.style.removeProperty("display"),e.style.removeProperty("height"),e.scrollTop=t,this._dispatchIronResizeEventIfNeeded("InputHeight",s)}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(P.is,P);const F=c`<dom-module id="lumo-number-field" theme-for="vaadin-number-field">
135
+ <template>
136
+ <style include="lumo-field-button">
137
+ :host {
138
+ width: 8em;
139
+ }
140
+
141
+ :host([has-controls]:not([theme~="align-right"])) [part="value"] {
142
+ text-align: center;
143
+ }
144
+
145
+ [part="decrease-button"][disabled],
146
+ [part="increase-button"][disabled] {
147
+ opacity: 0.2;
148
+ }
149
+
150
+ :host([has-controls]) [part="input-field"] {
151
+ padding: 0;
152
+ }
153
+
154
+ [part="decrease-button"],
155
+ [part="increase-button"] {
156
+ cursor: pointer;
157
+ font-size: var(--lumo-icon-size-s);
158
+ width: 1.6em;
159
+ height: 1.6em;
160
+ }
161
+
162
+ [part="decrease-button"]::before,
163
+ [part="increase-button"]::before {
164
+ margin-top: 0.2em;
165
+ }
166
+
167
+ /* RTL specific styles */
168
+
169
+ :host([dir="rtl"]) [part="value"],
170
+ :host([dir="rtl"]) [part="input-field"] ::slotted(input) {
171
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
172
+ }
173
+ </style>
174
+ </template>
175
+ </dom-module>`;document.head.appendChild(F.content);
176
+ /**
177
+ @license
178
+ Copyright (c) 2017 Vaadin Ltd.
179
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
180
+ */
181
+ const z=c`<dom-module id="vaadin-number-field-template">
182
+ <template>
183
+ <style>
184
+ :host([readonly]) [part\$="button"] {
185
+ pointer-events: none;
186
+ }
187
+
188
+ [part="decrease-button"]::before {
189
+ content: "−";
190
+ }
191
+
192
+ [part="increase-button"]::before {
193
+ content: "+";
194
+ }
195
+
196
+ [part="decrease-button"],
197
+ [part="increase-button"] {
198
+ -webkit-user-select: none;
199
+ -moz-user-select: none;
200
+ -ms-user-select: none;
201
+ user-select: none;
202
+ }
203
+
204
+ /* Hide the native arrow icons */
205
+ [part="value"]::-webkit-outer-spin-button,
206
+ [part="value"]::-webkit-inner-spin-button {
207
+ -webkit-appearance: none;
208
+ margin: 0;
209
+ }
210
+
211
+ [part="value"] {
212
+ /* Older Firefox versions (v47.0) requires !important */
213
+ -moz-appearance: textfield !important;
214
+ }
215
+
216
+ :host([dir="rtl"]) [part="input-field"] {
217
+ direction: ltr;
218
+ }
219
+
220
+ :host([dir="rtl"]) [part="value"]::placeholder {
221
+ direction: rtl;
222
+ }
223
+
224
+ :host([dir="rtl"]) [part="input-field"] ::slotted(input)::placeholder {
225
+ direction: rtl;
226
+ }
227
+
228
+ :host([dir="rtl"]) [part="value"]:-ms-input-placeholder,
229
+ :host([dir="rtl"]) [part="input-field"] ::slotted(input):-ms-input-placeholder {
230
+ direction: rtl;
231
+ }
232
+
233
+ :host([dir="rtl"]:not([has-controls])) [part="value"]::placeholder {
234
+ text-align: left;
235
+ }
236
+
237
+ :host([dir="rtl"]:not([has-controls])) [part="input-field"] ::slotted(input)::placeholder {
238
+ text-align: left;
239
+ }
240
+
241
+ :host([dir="rtl"]:not([has-controls])) [part="value"]:-ms-input-placeholder,
242
+ :host([dir="rtl"]:not([has-controls])) [part="input-field"] ::slotted(input):-ms-input-placeholder {
243
+ text-align: left;
244
+ }
245
+ </style>
246
+
247
+ <div disabled\$="[[!_allowed(-1, value, min, max, step)]]" part="decrease-button" on-click="_decreaseValue" on-touchend="_decreaseButtonTouchend" hidden\$="[[!hasControls]]">
248
+ </div>
249
+
250
+ <div disabled\$="[[!_allowed(1, value, min, max, step)]]" part="increase-button" on-click="_increaseValue" on-touchend="_increaseButtonTouchend" hidden\$="[[!hasControls]]">
251
+ </div>
252
+ </template>
253
+
254
+
255
+ </dom-module>`;let U;document.head.appendChild(z.content);class O extends h{static get is(){return"vaadin-number-field"}static get version(){return"2.9.0"}static get properties(){return{hasControls:{type:Boolean,value:!1,reflectToAttribute:!0},min:{type:Number,reflectToAttribute:!0,observer:"_minChanged"},max:{type:Number,reflectToAttribute:!0,observer:"_maxChanged"},step:{type:Number,value:1,observer:"_stepChanged"}}}ready(){super.ready(),this.__previousValidInput=this.value||"",this.inputElement.type="number",this.inputElement.addEventListener("change",this.__onInputChange.bind(this))}_decreaseButtonTouchend(e){e.preventDefault(),this._decreaseValue()}_increaseButtonTouchend(e){e.preventDefault(),this._increaseValue()}static get template(){if(!U){U=super.template.cloneNode(!0);const e=m.import(this.is+"-template","template"),t=e.content.querySelector('[part="decrease-button"]'),a=e.content.querySelector('[part="increase-button"]'),i=e.content.querySelector("style"),s=U.content.querySelector('[part="input-field"]'),n=U.content.querySelector('[name="prefix"]');s.insertBefore(t,n),s.appendChild(a),U.content.appendChild(i)}return U}_createConstraintsObserver(){this._createMethodObserver("_constraintsChanged(required, minlength, maxlength, pattern, min, max, step)")}_constraintsChanged(e,t,a,i,s,n,r){if(!this.invalid)return;const l=e=>!e&&0!==e;l(s)&&l(n)?super._constraintsChanged(e,t,a,i):this.validate()}_decreaseValue(){this._incrementValue(-1)}_increaseValue(){this._incrementValue(1)}_incrementValue(e){if(this.disabled||this.readonly)return;let t=parseFloat(this.value);this.value?t<this.min?(e=0,t=this.min):t>this.max&&(e=0,t=this.max):0==this.min&&e<0||0==this.max&&e>0||0==this.max&&0==this.min?(e=0,t=0):(null==this.max||this.max>=0)&&(null==this.min||this.min<=0)?t=0:this.min>0?(t=this.min,this.max<0&&e<0&&(t=this.max),e=0):this.max<0&&(t=this.max,e<0?e=0:this._getIncrement(1,t-this.step)>this.max?t-=2*this.step:t-=this.step);const a=this._getIncrement(e,t);this.value&&0!=e&&!this._incrementIsInsideTheLimits(e,t)||this._setValue(a)}_setValue(e){this.value=this.inputElement.value=String(parseFloat(e)),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_getIncrement(e,t){let a=this.step||1,i=this.min||0;const s=Math.max(this._getMultiplier(t),this._getMultiplier(a),this._getMultiplier(i));a*=s,i*=s;const n=((t=Math.round(t*s))-i)%a;return e>0?(t-n+a)/s:e<0?(t-(n||a))/s:t/s}_getDecimalCount(e){const t=String(e),a=t.indexOf(".");return-1===a?1:t.length-a-1}_getMultiplier(e){if(!isNaN(e))return Math.pow(10,this._getDecimalCount(e))}_incrementIsInsideTheLimits(e,t){return e<0?null==this.min||this._getIncrement(e,t)>=this.min:e>0?null==this.max||this._getIncrement(e,t)<=this.max:this._getIncrement(e,t)<=this.max&&this._getIncrement(e,t)>=this.min}_allowed(e){const t=e*(this.step||1),a=parseFloat(this.value);return!this.value||!this.disabled&&this._incrementIsInsideTheLimits(t,a)}_stepChanged(e,t){this.__validateByStep=this.__stepChangedCalled||null!==this.getAttribute("step"),this.inputElement.step=this.__validateByStep?e:"any",this.__stepChangedCalled=!0,this.setAttribute("step",e)}_minChanged(e){this.inputElement.min=e}_maxChanged(e){this.inputElement.max=e}_valueChanged(e,t){e&&isNaN(parseFloat(e))?this.value="":"string"!=typeof this.value&&(this.value=String(this.value)),super._valueChanged(this.value,t)}_onKeyDown(e){38==e.keyCode?(e.preventDefault(),this._increaseValue()):40==e.keyCode&&(e.preventDefault(),this._decreaseValue()),super._onKeyDown(e)}__onInputChange(){this.validate()}checkValidity(){return void 0!==this.min||void 0!==this.max||this.__validateByStep?this.inputElement.checkValidity():super.checkValidity()}}window.customElements.define(O.is,O);
256
+ /**
257
+ @license
258
+ Copyright (c) 2019 Vaadin Ltd.
259
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
260
+ */
261
+ const H=c`<dom-module id="vaadin-integer-field-template">
262
+
263
+
264
+ </dom-module>`;document.head.appendChild(H.content);class R extends O{static get is(){return"vaadin-integer-field"}static get version(){return"2.9.0"}static get properties(){return{pattern:String,preventInvalidInput:Boolean,minlength:Number,maxlength:Number}}ready(){super.ready(),this._enabledCharPattern="[-+\\d]"}_valueChanged(e,t){if(""!==e&&!this.__isInteger(e))return console.warn(`Trying to set non-integer value "${e}" to <vaadin-integer-field>. Clearing the value.`),void(this.value="");super._valueChanged(e,t)}_stepChanged(e,t){if(!this.__hasOnlyDigits(e))return console.warn(`Trying to set invalid step size "${e}", which is not a positive integer, to <vaadin-integer-field>. Resetting the default value 1.`),void(this.step=1);super._stepChanged(e,t)}__isInteger(e){return/^(-\d)?\d*$/.test(String(e))}__hasOnlyDigits(e){return/^\d*$/.test(String(e))}}window.customElements.define(R.is,R);class Y extends CustomEvent{constructor(e){super("change",{detail:e})}}class W extends CustomEvent{constructor(e){super("change",{detail:e})}}class X extends W{}const K=e((e=>i=>{const{element:s,name:n,strings:r}=i.committer;if(2!==r.length||""!==r[0]||""!==r[1])throw new Error("live directive bindings must not contain any static values");if(i.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(i instanceof t)s[n]!==e&&i.setValue(e);else{if(!(i instanceof a))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(n)!==e&&i.setValue(e)}}));let Q,Z,G=e=>e;class J extends i{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}=D(e);return[t.toString(),a]}},this.__getItems=A((e=>{const t=D(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{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},lang:{type:String}}}static get styles(){return s(Q||(Q=G`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0}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}`))}connectedCallback(){super.connectedCallback(),this.__untrackTranslations=customElements.get("foxy-i18n").onTranslationChange((()=>{var e,t;null===(t=(e=this.__getItems.cache).clear)||void 0===t||t.call(e),this.requestUpdate()}))}render(){return n(Z||(Z=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,K(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)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__untrackTranslations)||void 0===e||e.call(this)}checkValidity(){return!0}get __t(){return customElements.get("foxy-i18n").i18next.getFixedT(this.lang)}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new X(this.value))}}const ee=M({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:B.assign({defaultCustomValue:(e,t)=>t.data}),setValue:B.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:B.assign({custom:(e,t)=>t.data}),setItems:B.assign({items:(e,t)=>t.data}),setType:B.assign({type:(e,t)=>t.data}),setMin:B.assign({min:(e,t)=>t.data}),setMax:B.assign({max:(e,t)=>t.data})}});let te,ae,ie,se,ne,re,le,oe,de,ue,he,ce,pe,me=e=>e;const ge=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class ve extends q{constructor(){super(...arguments),this.getText=e=>e,this.__service=N(ee).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":J,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,s(ie||(ie=me`: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 r(r({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,ge]:this.items,t=Array.isArray(this.value),a=this.__service.state.matches("extension.present.selected"),i=n(se||(se=me` ${0} `),e.map(((e,i,s)=>{var r;const l=this.custom&&i===s.length-1,o=l?a:t?!!(null===(r=this.value)||void 0===r?void 0:r.includes(e)):e===String(this.value),d=this.disabled||!this._isI18nReady,u=L({value:l?ge:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":d,"@change":t=>{if(this.readonly)return t.preventDefault();const a=t.target.checked,i=e===ge?this.defaultCustomValue:e,s=this.value;Array.isArray(s)?this.value=e===ge?a?[...s,i]:s.slice(0,s.length-1):a?[i,...s]:s.filter((e=>e!==i)):this.value=a?i:null,this.dispatchEvent(new Y(this.value))}}),h=n(ne||(ne=me` <div> ${0} </div> `),e===ge?this._t("choice.other").toString():n(re||(re=me`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return n(le||(le=me` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),i?"":"hidden",t?function(e,t,a,i,s){const r="transition ease-in-out duration-200",l=`${r} transform ${a?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return n(ae||(ae=me` <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,i,t?"text-disabled":e?"text-secondary":"text-body",s)}(this.readonly,d,o,u,h):function(e,t,a,i,s){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 n(te||(te=me` <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,i,t?"text-disabled":e?"text-secondary":"text-body",s)}(this.readonly,d,o,u,h),e===ge&&a?this.__field:"",e!==ge?n(oe||(oe=me`<slot name="${0}"></slot>`),e):"")})));return n(de||(de=me`<form>${0}</form> `),i)}get __field(){const e=L({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,"?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 Y(this.value))}});return"frequency"===this.type?n(ue||(ue=me`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?n(he||(he=me`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"textarea"===this.type?n(ce||(ce=me`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):n(pe||(pe=me`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}export{ve as C,W as D,R as I,Y as a,B as b};
@@ -0,0 +1,12 @@
1
+ import{D as t,a as e,i as n,e as o}from"./shared-ff79f3f9.js";class l extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",l);const s=document.createElement("template");s.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(s.content);const a=document.createElement("template");a.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(a.content);const r=document.createElement("template");r.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(r.content);const i=document.createElement("template");i.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(i.content);const c=document.createElement("template");c.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(c.content);
2
+ /**
3
+ @license
4
+ Copyright (c) 2017 Vaadin Ltd.
5
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6
+ */
7
+ let m=!1;window.addEventListener("keydown",(()=>{m=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{m=!1}),{capture:!0});const u=t=>class extends((t=>class extends t{static get properties(){var t={tabindex:{type:Number,value:0,reflectToAttribute:!0,observer:"_tabindexChanged"}};return window.ShadyDOM&&(t.tabIndex=t.tabindex),t}})(t)){static get properties(){return{autofocus:{type:Boolean},_previousTabIndex:{type:Number},disabled:{type:Boolean,observer:"_disabledChanged",reflectToAttribute:!0},_isShiftTabbing:{type:Boolean}}}ready(){this.addEventListener("focusin",(t=>{t.composedPath()[0]===this?this.contains(t.relatedTarget)||this._focus():-1===t.composedPath().indexOf(this.focusElement)||this.disabled||this._setFocused(!0)})),this.addEventListener("focusout",(t=>this._setFocused(!1))),super.ready();const t=t=>{t.composed||t.target.dispatchEvent(new CustomEvent(t.type,{bubbles:!0,composed:!0,cancelable:!1}))};this.shadowRoot.addEventListener("focusin",t),this.shadowRoot.addEventListener("focusout",t),this.addEventListener("keydown",(t=>{if(!t.defaultPrevented&&9===t.keyCode)if(t.shiftKey)this._isShiftTabbing=!0,HTMLElement.prototype.focus.apply(this),this._setFocused(!1),setTimeout((()=>this._isShiftTabbing=!1),0);else{const t=window.navigator.userAgent.match(/Firefox\/(\d\d\.\d)/);if(t&&parseFloat(t[1])>=63&&parseFloat(t[1])<66&&this.parentNode&&this.nextSibling){const t=document.createElement("input");t.style.position="absolute",t.style.opacity="0",t.tabIndex=this.tabIndex,this.parentNode.insertBefore(t,this.nextSibling),t.focus(),t.addEventListener("focusout",(()=>this.parentNode.removeChild(t)))}}})),this.autofocus&&!this.disabled&&window.requestAnimationFrame((()=>{this._focus(),this._setFocused(!0),this.setAttribute("focus-ring","")}))}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){t?this.setAttribute("focused",""):this.removeAttribute("focused"),t&&m?this.setAttribute("focus-ring",""):this.removeAttribute("focus-ring")}get focusElement(){return window.console.warn(`Please implement the 'focusElement' property in <${this.localName}>`),this}_focus(){this.focusElement&&!this._isShiftTabbing&&(this.focusElement.focus(),this._setFocused(!0))}focus(){this.focusElement&&!this.disabled&&(this.focusElement.focus(),this._setFocused(!0))}blur(){this.focusElement&&(this.focusElement.blur(),this._setFocused(!1))}_disabledChanged(t){this.focusElement.disabled=t,t?(this.blur(),this._previousTabIndex=this.tabindex,this.tabindex=-1,this.setAttribute("aria-disabled","true")):(void 0!==this._previousTabIndex&&(this.tabindex=this._previousTabIndex),this.removeAttribute("aria-disabled"))}_tabindexChanged(t){void 0!==t&&(this.focusElement.tabIndex=t),this.disabled&&this.tabindex&&(-1!==this.tabindex&&(this._previousTabIndex=this.tabindex),this.tabindex=t=void 0),window.ShadyDOM&&this.setProperties({tabIndex:t,tabindex:t})}click(){this.disabled||super.click()}},d=t=>class extends t{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),"theme"===t&&this._setTheme(n)}},h=e=>class extends(d(e)){static finalize(){super.finalize();const t=this.prototype._template,e=this.template&&this.template.parentElement&&this.template.parentElement.id===this.is,n=Object.getPrototypeOf(this.prototype)._template;n&&!e&&Array.from(n.content.querySelectorAll("style[include]")).forEach((e=>{this._includeStyle(e.getAttribute("include"),t)})),this._includeMatchingThemes(t)}static _includeMatchingThemes(e){const n=t.prototype.modules;let o=!1;const l=this.is+"-default-theme";Object.keys(n).sort(((t,e)=>{const n=0===t.indexOf("vaadin-"),o=0===e.indexOf("vaadin-"),l=["lumo-","material-"],s=l.filter((e=>0===t.indexOf(e))).length>0,a=l.filter((t=>0===e.indexOf(t))).length>0;return n!==o?n?-1:1:s!==a?s?-1:1:0})).forEach((t=>{if(t!==l){const l=n[t].getAttribute("theme-for");l&&l.split(" ").forEach((n=>{new RegExp("^"+n.split("*").join(".*")+"$").test(this.is)&&(o=!0,this._includeStyle(t,e))}))}})),!o&&n[l]&&this._includeStyle(l,e)}static _includeStyle(t,e){if(e&&!e.content.querySelector(`style[include="${t}"]`)){const n=document.createElement("style");n.setAttribute("include",t),e.content.appendChild(n)}}}
8
+ /**
9
+ @license
10
+ Copyright (c) 2020 Vaadin Ltd.
11
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
12
+ */;class p{static detectScrollType(){const t=document.createElement("div");t.textContent="ABCD",t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t);let e="reverse";return t.scrollLeft>0?e="default":(t.scrollLeft=2,t.scrollLeft<2&&(e="negative")),document.body.removeChild(t),e}static getNormalizedScrollLeft(t,e,n){const{scrollLeft:o}=n;if("rtl"!==e||!t)return o;switch(t){case"negative":return n.scrollWidth-n.clientWidth+o;case"reverse":return n.scrollWidth-n.clientWidth-o}return o}static setNormalizedScrollLeft(t,e,n,o){if("rtl"===e&&t)switch(t){case"negative":n.scrollLeft=n.clientWidth-n.scrollWidth+o;break;case"reverse":n.scrollLeft=n.scrollWidth-n.clientWidth-o;break;default:n.scrollLeft=o}else n.scrollLeft=o}}const b=[];let f;new MutationObserver((function(){const t=x();b.forEach((e=>{v(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const v=function(t,e){e?t.setAttribute("dir",e):t.removeAttribute("dir")},x=function(){return document.documentElement.getAttribute("dir")},y=t=>class extends t{static get properties(){return{dir:{type:String,readOnly:!0}}}static finalize(){super.finalize(),f||(f=p.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),v(this,x()))}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),"dir"!==t)return;const o=n===x()&&-1===b.indexOf(this),l=!n&&e&&-1===b.indexOf(this),s=n!==x()&&e===x();o||l?(this.__subscribe(),v(this,x())):s&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}__subscribe(t=!0){t?-1===b.indexOf(this)&&b.push(this):b.indexOf(this)>-1&&b.splice(b.indexOf(this),1)}__getNormalizedScrollLeft(t){return p.getNormalizedScrollLeft(f,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return p.setNormalizedScrollLeft(f,this.getAttribute("dir")||"ltr",t,e)}},g=/\/\*\*\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,w=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function z(t,e){if("function"!=typeof t)return;const n=g.exec(t.toString());if(n)try{t=new Function(n[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};const k=function(t,e){if(window.Vaadin.developmentMode)return z(t,e)};function _(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(w?!(w&&Object.keys(w).map((t=>w[t])).filter((t=>t.productionMode)).length>0):!z((function(){return!0})))}catch(t){return!1}}());const E=function(){return k(_)};let C;window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations=window.Vaadin.registrations||[],window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{},window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){E&&E()};const S=new Set,F=t=>class extends(y(t)){static finalize(){super.finalize();const{is:t}=this;t&&!S.has(t)&&(window.Vaadin.registrations.push(this),S.add(t),window.Vaadin.developmentModeCallback&&(C=e.debounce(C,n,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),o(C)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};export{u as C,y as D,F as E,h as T,p as a};
@@ -1 +1 @@
1
- import"./shared-b98f88c9.js";import"./foxy-i18n.js";import{_ as t,h as e}from"./shared-17968c53.js";import{D as i}from"./shared-b0b1d248.js";let s,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends i{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(s||(s=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
1
+ import"./shared-0ced76a0.js";import"./foxy-i18n.js";import{_ as t,h as e}from"./shared-63eaded9.js";import{D as i}from"./shared-07abcd7b.js";let s,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends i{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(s||(s=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
@@ -1 +1 @@
1
- import{A as e,aa as t}from"./shared-50744508.js";import{d as s}from"./shared-17968c53.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
1
+ import{A as e,a7 as t}from"./shared-1761daef.js";import{d as s}from"./shared-63eaded9.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};