@ezeep/ezeep-js 1.0.277 → 1.0.287
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/cjs/ezeep.cjs.js +1 -1
- package/dist/cjs/ezp-auth_15.cjs.entry.js +116 -38
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ezp-auth/ezp-auth.css +0 -12
- package/dist/collection/components/ezp-auth/ezp-auth.js +23 -4
- package/dist/collection/components/ezp-dialog/ezp-dialog.js +1 -1
- package/dist/collection/components/ezp-icon/assets/glyph-cloud-upload.svg +4 -0
- package/dist/collection/components/ezp-icon/assets/glyph-file.svg +3 -0
- package/dist/collection/components/ezp-icon/ezp-icon.js +1 -1
- package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +1 -1
- package/dist/collection/components/ezp-input/ezp-input.css +17 -33
- package/dist/collection/components/ezp-input/ezp-input.js +1 -1
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +175 -48
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +10 -8
- package/dist/collection/components/ezp-printing/ezp-printing.css +14 -14
- package/dist/collection/components/ezp-printing/ezp-printing.js +17 -2
- package/dist/collection/components/ezp-select/ezp-select.css +54 -36
- package/dist/collection/components/ezp-select/ezp-select.js +1 -1
- package/dist/collection/components/ezp-status/ezp-status.css +94 -9
- package/dist/collection/components/ezp-status/ezp-status.js +22 -3
- package/dist/collection/components/ezp-stepper/ezp-stepper.css +37 -35
- package/dist/collection/components/ezp-stepper/ezp-stepper.js +2 -2
- package/dist/collection/components/ezp-text-button/ezp-text-button.css +3 -3
- package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
- package/dist/collection/components/ezp-upload/ezp-upload.css +223 -75
- package/dist/collection/components/ezp-upload/ezp-upload.js +75 -3
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +1 -1
- package/dist/collection/types/shared/types.d.ts +2 -0
- package/dist/components/ezp-auth2.js +1 -1
- package/dist/components/ezp-input2.js +1 -1
- package/dist/components/ezp-printer-selection2.js +1 -1
- package/dist/components/ezp-printing.js +1 -1
- package/dist/components/ezp-select2.js +1 -1
- package/dist/components/ezp-status2.js +1 -1
- package/dist/components/ezp-stepper2.js +1 -1
- package/dist/components/ezp-text-button2.js +1 -1
- package/dist/components/ezp-upload2.js +1 -1
- package/dist/components/ezp-user-menu2.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/directives/proxies.ts +18 -6
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/ezp-auth_15.entry.js +116 -38
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/assets/glyph-cloud-upload.svg +4 -0
- package/dist/ezeep/assets/glyph-file.svg +3 -0
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/{p-644e48a0.system.entry.js → p-0aae0597.system.entry.js} +2 -2
- package/dist/ezeep/p-7b19a21a.entry.js +1 -0
- package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
- package/dist/ezeep/types/shared/types.d.ts +2 -0
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +7 -0
- package/dist/types/components/ezp-status/ezp-status.d.ts +1 -0
- package/dist/types/components/ezp-upload/ezp-upload.d.ts +11 -0
- package/dist/types/components.d.ts +15 -2
- package/dist/types/shared/types.d.ts +2 -0
- package/package.json +1 -1
- package/www/build/assets/glyph-cloud-upload.svg +4 -0
- package/www/build/assets/glyph-file.svg +3 -0
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/{p-644e48a0.system.entry.js → p-0aae0597.system.entry.js} +2 -2
- package/www/build/p-7b19a21a.entry.js +1 -0
- package/www/build/p-879553e9.js +1 -0
- package/www/build/p-DCznw2Ee.system.js +1 -1
- package/www/data/locales/de.json +12 -5
- package/www/data/locales/en.json +12 -5
- package/www/index.html +1 -1
- package/dist/ezeep/p-ebd2beda.entry.js +0 -1
- package/www/build/p-c7252f1c.js +0 -1
- package/www/build/p-ebd2beda.entry.js +0 -1
|
@@ -1,129 +1,277 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
1
|
/**
|
|
3
2
|
*
|
|
4
3
|
* Rules
|
|
5
4
|
*
|
|
6
5
|
*/
|
|
7
6
|
:host {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
--ezp-upload-gradient: linear-gradient(
|
|
8
|
+
135deg,
|
|
9
|
+
color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%,
|
|
10
|
+
color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100%
|
|
11
|
+
);
|
|
12
12
|
box-sizing: border-box;
|
|
13
13
|
color: var(--ezp-core-foreground-primary);
|
|
14
|
-
display:
|
|
15
|
-
|
|
14
|
+
display: block;
|
|
15
|
+
width: var(--ezp-upload-width, auto);
|
|
16
16
|
height: var(--ezp-upload-height, auto);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
*,
|
|
20
|
+
*::before,
|
|
21
|
+
*::after {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#form {
|
|
26
|
+
display: block;
|
|
27
|
+
height: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#input {
|
|
31
|
+
appearance: none;
|
|
32
|
+
height: 0;
|
|
33
|
+
opacity: 0;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
position: absolute;
|
|
36
|
+
width: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
#modal {
|
|
40
|
+
background: var(--ezp-core-surface-tertiary);
|
|
41
|
+
border-radius: 16px;
|
|
42
|
+
box-shadow: 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
gap: var(--ezp-spacing-4);
|
|
46
|
+
height: 100%;
|
|
47
|
+
padding: var(--ezp-spacing-5);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* Dropzone
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
#dropzone {
|
|
56
|
+
align-items: center;
|
|
57
|
+
background: var(--ezp-upload-background, transparent);
|
|
58
|
+
border: 1.5px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));
|
|
59
|
+
border-radius: 12px;
|
|
60
|
+
display: flex;
|
|
61
|
+
/* Grow to fill the modal body so the dashed box spans the available height,
|
|
62
|
+
and keep the contents centered vertically within it. */
|
|
63
|
+
flex: 1 1 auto;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: var(--ezp-spacing-4);
|
|
17
66
|
justify-content: center;
|
|
18
|
-
|
|
19
|
-
|
|
67
|
+
min-height: 0;
|
|
68
|
+
padding: var(--ezp-spacing-6) var(--ezp-spacing-5);
|
|
69
|
+
text-align: center;
|
|
20
70
|
transition: background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);
|
|
21
|
-
width: var(--ezp-upload-width, auto);
|
|
22
71
|
}
|
|
72
|
+
|
|
23
73
|
:host(.dragging) {
|
|
24
74
|
--ezp-upload-background: var(--ezp-theme-translucent);
|
|
25
|
-
--ezp-upload-border-color: var(--ezp-theme-
|
|
26
|
-
--ezp-upload-header-blur: 16px;
|
|
27
|
-
--ezp-upload-header-opacity: 0.42;
|
|
75
|
+
--ezp-upload-border-color: var(--ezp-theme-solid);
|
|
28
76
|
}
|
|
29
77
|
|
|
30
|
-
#
|
|
31
|
-
--ezp-icon-fill: var(--ezp-theme-solid);
|
|
78
|
+
#cloud {
|
|
32
79
|
align-items: center;
|
|
80
|
+
background: var(--ezp-upload-gradient);
|
|
81
|
+
border-radius: 20px;
|
|
82
|
+
box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);
|
|
83
|
+
color: var(--ezp-white-100);
|
|
33
84
|
display: flex;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
opacity: var(--ezp-upload-header-opacity, 1);
|
|
38
|
-
text-align: center;
|
|
39
|
-
transition: filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);
|
|
40
|
-
/* When files are selected, collapse the drop-zone icon and primary description
|
|
41
|
-
so the file list has more breathing room. */
|
|
42
|
-
}
|
|
43
|
-
#header:has(#file-list) {
|
|
44
|
-
gap: var(--ezp-spacing-3);
|
|
85
|
+
height: 84px;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
width: 84px;
|
|
45
88
|
}
|
|
46
|
-
#
|
|
47
|
-
|
|
89
|
+
#cloud ezp-icon {
|
|
90
|
+
--ezp-icon-size: 40px;
|
|
91
|
+
--ezp-icon-gridTemplate: 40px;
|
|
48
92
|
}
|
|
49
|
-
|
|
50
|
-
|
|
93
|
+
|
|
94
|
+
#dropzone-title {
|
|
95
|
+
--ezp-label-fontSize: 20px;
|
|
96
|
+
--ezp-label-lineHeight: 26px;
|
|
51
97
|
}
|
|
52
98
|
|
|
53
99
|
#meta {
|
|
100
|
+
align-items: baseline;
|
|
101
|
+
color: var(--ezp-core-foreground-secondary);
|
|
54
102
|
display: flex;
|
|
55
103
|
flex-wrap: wrap;
|
|
56
|
-
gap:
|
|
104
|
+
gap: 4px;
|
|
57
105
|
justify-content: center;
|
|
58
106
|
}
|
|
59
107
|
|
|
60
|
-
#
|
|
108
|
+
#browse {
|
|
61
109
|
color: var(--ezp-theme-solid);
|
|
62
110
|
cursor: pointer;
|
|
63
|
-
opacity: var(--ezp-upload-
|
|
64
|
-
text-decoration: underline;
|
|
65
|
-
white-space: nowrap;
|
|
111
|
+
opacity: var(--ezp-upload-browse-opacity, 1);
|
|
66
112
|
}
|
|
67
113
|
@media (hover: hover) {
|
|
68
|
-
#
|
|
69
|
-
--ezp-upload-
|
|
114
|
+
#browse:hover {
|
|
115
|
+
--ezp-upload-browse-opacity: 0.6;
|
|
70
116
|
}
|
|
71
117
|
}
|
|
72
118
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* Format chips
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
#formats {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
gap: var(--ezp-spacing-2);
|
|
128
|
+
justify-content: center;
|
|
80
129
|
}
|
|
81
130
|
|
|
82
|
-
|
|
131
|
+
.format {
|
|
132
|
+
background: transparent;
|
|
133
|
+
border: 1px solid var(--ezp-core-outline);
|
|
134
|
+
border-radius: 999px;
|
|
135
|
+
color: var(--ezp-core-foreground-secondary);
|
|
136
|
+
font-size: 12px;
|
|
137
|
+
font-weight: 600;
|
|
138
|
+
letter-spacing: 0.02em;
|
|
139
|
+
line-height: 1;
|
|
140
|
+
padding: 7px 14px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
* File thumbnails
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
148
|
+
#thumbs {
|
|
83
149
|
display: flex;
|
|
84
|
-
flex-
|
|
85
|
-
gap: var(--ezp-spacing-
|
|
86
|
-
|
|
150
|
+
flex-wrap: wrap;
|
|
151
|
+
gap: var(--ezp-spacing-4);
|
|
152
|
+
justify-content: center;
|
|
153
|
+
max-height: 40vh;
|
|
87
154
|
overflow-y: auto;
|
|
88
|
-
|
|
89
|
-
/* Cross-platform thin scrollbar — Windows default is too chunky for this size. */
|
|
155
|
+
padding: var(--ezp-spacing-1);
|
|
90
156
|
scrollbar-width: thin;
|
|
91
157
|
width: 100%;
|
|
92
|
-
/* WebKit fallback for older Safari / Chrome that don't honor scrollbar-width. */
|
|
93
158
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
159
|
+
|
|
160
|
+
.thumb {
|
|
161
|
+
align-items: center;
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
gap: 6px;
|
|
165
|
+
position: relative;
|
|
166
|
+
width: 88px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.thumb-icon {
|
|
170
|
+
align-items: center;
|
|
171
|
+
background: var(--ezp-upload-gradient);
|
|
172
|
+
border-radius: 50%;
|
|
173
|
+
color: var(--ezp-white-100);
|
|
174
|
+
display: flex;
|
|
175
|
+
height: 56px;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
width: 56px;
|
|
97
178
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
179
|
+
.thumb-icon ezp-icon {
|
|
180
|
+
--ezp-icon-size: 26px;
|
|
181
|
+
--ezp-icon-gridTemplate: 26px;
|
|
101
182
|
}
|
|
102
|
-
|
|
103
|
-
|
|
183
|
+
|
|
184
|
+
.thumb-name {
|
|
185
|
+
--ezp-label-minWidth: 0;
|
|
186
|
+
max-width: 100%;
|
|
104
187
|
}
|
|
105
188
|
|
|
106
|
-
.
|
|
107
|
-
|
|
108
|
-
background: var(--ezp-core-background-secondary);
|
|
109
|
-
border-radius: 3px;
|
|
110
|
-
display: grid;
|
|
111
|
-
gap: var(--ezp-spacing-3);
|
|
112
|
-
grid-template-columns: 1fr auto;
|
|
113
|
-
min-height: 32px;
|
|
114
|
-
padding: var(--ezp-spacing-2) var(--ezp-spacing-3);
|
|
189
|
+
.thumb-meta {
|
|
190
|
+
letter-spacing: 0.02em;
|
|
115
191
|
}
|
|
116
192
|
|
|
117
|
-
.
|
|
118
|
-
|
|
119
|
-
|
|
193
|
+
.thumb-remove {
|
|
194
|
+
align-items: center;
|
|
195
|
+
appearance: none;
|
|
196
|
+
background: var(--ezp-core-surface-tertiary);
|
|
197
|
+
border: 1px solid var(--ezp-core-outline);
|
|
198
|
+
border-radius: 50%;
|
|
199
|
+
color: var(--ezp-core-foreground-secondary);
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
display: flex;
|
|
202
|
+
height: 20px;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
padding: 0;
|
|
205
|
+
position: absolute;
|
|
206
|
+
right: 8px;
|
|
207
|
+
top: -4px;
|
|
208
|
+
transition: color var(--ezp-duration-2) var(--ezp-easing-out-quart);
|
|
209
|
+
width: 20px;
|
|
210
|
+
z-index: 1;
|
|
120
211
|
}
|
|
121
|
-
.
|
|
122
|
-
--ezp-
|
|
212
|
+
.thumb-remove ezp-icon {
|
|
213
|
+
--ezp-icon-size: 12px;
|
|
214
|
+
--ezp-icon-gridTemplate: 12px;
|
|
215
|
+
}
|
|
216
|
+
@media (hover: hover) {
|
|
217
|
+
.thumb-remove:hover {
|
|
218
|
+
color: var(--ezp-core-foreground-primary);
|
|
219
|
+
}
|
|
123
220
|
}
|
|
124
221
|
|
|
125
|
-
.
|
|
222
|
+
.thumb-add {
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
}
|
|
225
|
+
.thumb-add .thumb-add-icon {
|
|
126
226
|
align-items: center;
|
|
227
|
+
border: 1.5px dashed var(--ezp-core-foreground-tertiary);
|
|
228
|
+
border-radius: 50%;
|
|
229
|
+
color: var(--ezp-core-foreground-secondary);
|
|
127
230
|
display: flex;
|
|
128
|
-
|
|
231
|
+
height: 56px;
|
|
232
|
+
justify-content: center;
|
|
233
|
+
transition: border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);
|
|
234
|
+
width: 56px;
|
|
235
|
+
}
|
|
236
|
+
.thumb-add .thumb-add-icon ezp-icon {
|
|
237
|
+
--ezp-icon-size: 24px;
|
|
238
|
+
--ezp-icon-gridTemplate: 24px;
|
|
239
|
+
}
|
|
240
|
+
@media (hover: hover) {
|
|
241
|
+
.thumb-add:hover .thumb-add-icon {
|
|
242
|
+
border-color: var(--ezp-theme-solid);
|
|
243
|
+
color: var(--ezp-theme-solid);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
*
|
|
249
|
+
* Ready counter
|
|
250
|
+
*
|
|
251
|
+
*/
|
|
252
|
+
#ready {
|
|
253
|
+
color: var(--ezp-core-foreground-secondary);
|
|
254
|
+
letter-spacing: 0.08em;
|
|
255
|
+
text-align: center;
|
|
256
|
+
text-transform: uppercase;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
*
|
|
261
|
+
* Footer
|
|
262
|
+
*
|
|
263
|
+
*/
|
|
264
|
+
#footer {
|
|
265
|
+
display: grid;
|
|
266
|
+
gap: var(--ezp-spacing-3);
|
|
267
|
+
grid-template-columns: 1fr 1.4fr;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.action {
|
|
271
|
+
--ezp-textButton-borderRadius: 999px;
|
|
272
|
+
--ezp-textButton-padding: var(--ezp-spacing-4);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
#continue {
|
|
276
|
+
--ezp-textButton-background-init: var(--ezp-upload-gradient);
|
|
129
277
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Host, h
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { subscribeToLanguageChange } from "../../utils/utils";
|
|
3
3
|
import i18next from "i18next";
|
|
4
|
+
/** File formats advertised to the user as supported for printing. */
|
|
5
|
+
const SUPPORTED_FORMATS = ['PDF', 'DOCX', 'PNG', 'JPG', 'XLSX'];
|
|
4
6
|
export class EzpUpload {
|
|
5
7
|
constructor() {
|
|
6
8
|
/**
|
|
@@ -36,6 +38,17 @@ export class EzpUpload {
|
|
|
36
38
|
this.input.value = '';
|
|
37
39
|
}
|
|
38
40
|
};
|
|
41
|
+
this.handleCancel = () => {
|
|
42
|
+
// Closing is the host's call: the event bubbles to `ezp-printing`, which
|
|
43
|
+
// ends the print flow. It also reaches the document, where our own
|
|
44
|
+
// `printCancel` listener resets the form and the selection.
|
|
45
|
+
this.printCancel.emit();
|
|
46
|
+
};
|
|
47
|
+
this.handleContinue = () => {
|
|
48
|
+
if (this.selectedFiles.length === 0)
|
|
49
|
+
return;
|
|
50
|
+
this.uploadContinue.emit(this.selectedFiles);
|
|
51
|
+
};
|
|
39
52
|
}
|
|
40
53
|
connectedCallback() {
|
|
41
54
|
this.unsubscribeLanguage = subscribeToLanguageChange(this);
|
|
@@ -77,13 +90,32 @@ export class EzpUpload {
|
|
|
77
90
|
(_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
|
|
78
91
|
this.selectedFiles = [];
|
|
79
92
|
}
|
|
93
|
+
/** Extract a short, upper-cased file-type label from the file name. */
|
|
94
|
+
fileType(name) {
|
|
95
|
+
const extension = name.split('.').pop();
|
|
96
|
+
return extension && extension !== name ? extension.toUpperCase() : i18next.t('upload.file_type_fallback');
|
|
97
|
+
}
|
|
98
|
+
/** Human-readable file size (matches the mockup's "14.6 KB" style). */
|
|
99
|
+
formatSize(bytes) {
|
|
100
|
+
if (bytes < 1024)
|
|
101
|
+
return `${bytes} B`;
|
|
102
|
+
const units = ['KB', 'MB', 'GB'];
|
|
103
|
+
let size = bytes / 1024;
|
|
104
|
+
let unit = 0;
|
|
105
|
+
while (size >= 1024 && unit < units.length - 1) {
|
|
106
|
+
size /= 1024;
|
|
107
|
+
unit++;
|
|
108
|
+
}
|
|
109
|
+
return `${size.toFixed(1)} ${units[unit]}`;
|
|
110
|
+
}
|
|
80
111
|
/**
|
|
81
112
|
*
|
|
82
113
|
* Render method
|
|
83
114
|
*
|
|
84
115
|
*/
|
|
85
116
|
render() {
|
|
86
|
-
|
|
117
|
+
const hasFiles = this.selectedFiles.length > 0;
|
|
118
|
+
return (h(Host, { key: '61f63c0ce2529b4389ca9adf6759cb67db742192', class: { dragging: this.dragging } }, h("form", { key: '141f9b3fcf32206b2dd9c96accf655fef46ba10a', id: "form", ref: (form) => (this.form = form) }, h("input", { key: '30a1215373e7a273cafac0e134cbc0e57b6449ed', type: "file", name: "input", id: "input", multiple: true, "aria-label": i18next.t('upload.description'), ref: (input) => (this.input = input), onInput: this.handleInput }), h("div", { key: '60540452c32a1342ba48367926bb0a226bc982a4', id: "modal" }, h("div", { key: '753a4fa19493bc0d60516771015de92d51e26282', id: "dropzone" }, hasFiles && (h("div", { key: 'd45c25efdfca9724b867e1b1a6c44a199402f633', id: "thumbs" }, this.selectedFiles.map((file, index) => (h("div", { key: index, class: "thumb" }, h("button", { type: "button", class: "thumb-remove", "aria-label": i18next.t('button_actions.close'), onClick: (event) => this.removeFile(event, index) }, h("ezp-icon", { name: "close" })), h("div", { class: "thumb-icon" }, h("ezp-icon", { name: "file" })), h("ezp-label", { class: "thumb-name", ellipsis: true, text: file.name }), h("ezp-label", { class: "thumb-meta", level: "tertiary", weight: "strong", text: `${this.fileType(file.name)} · ${this.formatSize(file.size)}` })))), h("label", { key: '17283f52957983344881fdbaf22ab7aa28dedc97', htmlFor: "input", class: "thumb thumb-add" }, h("div", { key: '9d686e95d2e001519c8915ce686ae3b250276da3', class: "thumb-add-icon" }, h("ezp-icon", { key: 'f18ba642f129379cadd5d71e42eabbe434808bee', name: "plus" })), h("ezp-label", { key: 'ef03b99760fd7eaf6acb5c9d8654d7f862122d19', class: "thumb-name", level: "tertiary", text: i18next.t('upload.add_more') })))), !hasFiles && (h("div", { key: '805df3ed48bd701a325869ebe4bb33f372a440d6', id: "cloud" }, h("ezp-icon", { key: '3e9fda14d452ecce60f541fd77529d97745a2ff9', name: "cloud-upload" }))), h("ezp-label", { key: 'e2203efbc3769d4f093ddafbd74d4723b111d70e', id: "dropzone-title", weight: "heavy", text: i18next.t('upload.dropzone_title') }), h("div", { key: '28e48fc98d28dfadfc5002ee95dd0f9f09588909', id: "meta" }, h("ezp-label", { key: 'd0a81fd2acf329510763faefb5ac8e7fcd99c67b', level: "secondary", text: i18next.t('upload.meta_leading') }), h("label", { key: '8d253191678ebf9e5f664047144820ddebe4ca43', htmlFor: "input", id: "browse" }, h("ezp-label", { key: '408a1a75c704db3fc5cf7d282646cc2d2ab6719b', level: "secondary", weight: "strong", text: i18next.t('upload.browse') })), h("ezp-label", { key: '53ac72da58256a38a5bb7a7b78ed545ffc6d12b2', level: "secondary", text: i18next.t('upload.meta_multiple') })), h("div", { key: '1fc8eef07376aaa54f0b5e23577a3125d6d00317', id: "formats" }, SUPPORTED_FORMATS.map((format) => (h("span", { class: "format", key: format }, format))))), hasFiles && (h("ezp-label", { key: '6340632d7c3d98f4660294661f6b01d414a77567', id: "ready", level: "secondary", weight: "strong", text: i18next.t('upload.files_ready', { count: this.selectedFiles.length }) })), h("div", { key: 'f146ff18286df2c422e1a17add49474d3ac5b32d', id: "footer" }, h("ezp-text-button", { key: '17916a9918fa1e9511ef9490839f24eee84694ef', type: "button", level: "secondary", onClick: this.handleCancel, label: i18next.t('button_actions.cancel'), class: "action" }), h("ezp-text-button", { key: '15dfc3f01e6050316bd875020bc8ce062f621154', id: "continue", type: "button", disabled: !hasFiles, onClick: this.handleContinue, label: i18next.t('upload.continue'), class: "action" }))))));
|
|
87
119
|
}
|
|
88
120
|
static get is() { return "ezp-upload"; }
|
|
89
121
|
static get encapsulation() { return "shadow"; }
|
|
@@ -112,7 +144,27 @@ export class EzpUpload {
|
|
|
112
144
|
"composed": true,
|
|
113
145
|
"docs": {
|
|
114
146
|
"tags": [],
|
|
115
|
-
"text": "
|
|
147
|
+
"text": "Keeps the parent's file state in sync as the selection changes."
|
|
148
|
+
},
|
|
149
|
+
"complexType": {
|
|
150
|
+
"original": "File[]",
|
|
151
|
+
"resolved": "File[]",
|
|
152
|
+
"references": {
|
|
153
|
+
"File": {
|
|
154
|
+
"location": "global",
|
|
155
|
+
"id": "global::File"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
"method": "uploadContinue",
|
|
161
|
+
"name": "uploadContinue",
|
|
162
|
+
"bubbles": true,
|
|
163
|
+
"cancelable": true,
|
|
164
|
+
"composed": true,
|
|
165
|
+
"docs": {
|
|
166
|
+
"tags": [],
|
|
167
|
+
"text": "Fired when the user confirms the selection and wants to move on to print options."
|
|
116
168
|
},
|
|
117
169
|
"complexType": {
|
|
118
170
|
"original": "File[]",
|
|
@@ -124,6 +176,26 @@ export class EzpUpload {
|
|
|
124
176
|
}
|
|
125
177
|
}
|
|
126
178
|
}
|
|
179
|
+
}, {
|
|
180
|
+
"method": "printCancel",
|
|
181
|
+
"name": "printCancel",
|
|
182
|
+
"bubbles": true,
|
|
183
|
+
"cancelable": true,
|
|
184
|
+
"composed": true,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "Fired when the user cancels, closing the print flow in the host app."
|
|
188
|
+
},
|
|
189
|
+
"complexType": {
|
|
190
|
+
"original": "MouseEvent",
|
|
191
|
+
"resolved": "MouseEvent",
|
|
192
|
+
"references": {
|
|
193
|
+
"MouseEvent": {
|
|
194
|
+
"location": "global",
|
|
195
|
+
"id": "global::MouseEvent"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
127
199
|
}];
|
|
128
200
|
}
|
|
129
201
|
static get listeners() {
|
|
@@ -84,7 +84,7 @@ export class EzpUserMenu {
|
|
|
84
84
|
*
|
|
85
85
|
*/
|
|
86
86
|
render() {
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: '8f5dde2735c47dc8102ddd5a625e26f853b7b587', class: this.open ? 'is-open' : '' }, h("div", { key: 'e188d9ad63ade716adaace39718bb988bc4159c9', id: "header" }, h("ezp-label", { key: '53907b171c8eeb9ed7a4a1c2cbf22e233110328c', ellipsis: true, id: "name", weight: "heavy", text: this.name }), h("ezp-icon-button", { key: '8370bfe1563693c31ee712e5a84662f39ea55ec0', id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), h("div", { key: '1c34c655d43f7de3375caeeba156f9eb616c11e8', id: "links" }, this.links.map((link) => (h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, h("ezp-icon", { class: "link__icon", name: link.icon }), h("ezp-label", { text: link.title })))), h("a", { key: '18bde718f8a7a480dd6cac365a306951f80028f5', class: "link", onClick: this.logOut }, h("ezp-icon", { key: '3f7ce8f3974b10a0ae866abd1f1371b652abe0b1', class: "link__icon", name: "logout" }), h("ezp-label", { key: '424e025c00b4cfe7638efbecd1680b8402a791e0', text: i18next.t('user_menu.logout') }))), h("div", { key: 'b163718862a0f086fd674134847d845fa229c91c', id: "theme" }, h("ezp-label", { key: '6bb91ea03c727485d53df484ea465d103b1d1af4', class: "caption", text: `${i18next.t('user_menu.theme')}:`, weight: "heavy" }), h("div", { key: 'c834c2421138fea1f497dec486664b3fd6f86b69', id: "swatches" }, this.themes.map((theme) => (h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, h("span", { class: "dot" })))))), h("div", { key: 'c84c57f3662760967c876242a85719a89f087eb3', id: "appearance" }, h("ezp-label", { key: '9ea2300e84a4d6421f496d3a033a97689b6fc498', class: "caption", text: `${i18next.t('user_menu.appearance')}:`, weight: "heavy" }), h("div", { key: '4718a7e9e71ebfeece0ccc2f9fe4ce94d703e08e', id: "tabs" }, this.appearances.map((appearance) => (h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, h("ezp-icon", { name: appearance.name }), h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
|
|
88
88
|
}
|
|
89
89
|
static get is() { return "ezp-user-menu"; }
|
|
90
90
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as i,Host as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as i,Host as o,transformTag as n}from"@stencil/core/internal/client";import{a,E as l}from"./auth.js";import{s as c,i as h}from"./utils.js";import{d as r}from"./ezp-dialog2.js";import{d}from"./ezp-icon2.js";import{d as u}from"./ezp-icon-button2.js";import{d as p}from"./ezp-label2.js";import{d as m}from"./ezp-status2.js";import{d as g}from"./ezp-text-button2.js";const z=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.authCancel=s(this,"authCancel",7),this.authSuccess=s(this,"authSuccess",7),this.userCancel=s(this,"userCancel",7),this.oauthPopupWindow=null,this.previousUrl=null,this.receiveMessage=t=>{if(this.oauthPopupWindow&&t.source&&t.source!==this.oauthPopupWindow)return void console.warn("[ezeep] Ignored auth message from an unexpected source window.");let e=null;try{e=new URL(this.redirectURI).origin}catch(t){e=null}e&&t.origin!==e?console.warn(`[ezeep] Ignored auth message from unexpected origin "${t.origin}" (expected "${e}").`):(a.state.code=t.data,this.auth.getAccessToken().then((()=>{this.authCancel.emit(),this.authSuccess.emit()})))}}listenDialogAction(){this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")}listenDialogClose(){this.authCancel.emit()}listenStatusCancel(){"file"===this.trigger?this.userCancel.emit():this.authCancel.emit()}connectedCallback(){this.unsubscribeLanguage=c(this)}disconnectedCallback(){var t;null===(t=this.unsubscribeLanguage)||void 0===t||t.call(this),window.removeEventListener("message",this.receiveMessage)}openSignInWindow(t,e){var s;if(a.state.isAuthorized)return this.authCancel.emit(),void this.authSuccess.emit();window.removeEventListener("message",this.receiveMessage);const i="toolbar=no, menubar=no, width=600, height=7000, top=100, left=100";null===this.oauthPopupWindow||this.oauthPopupWindow.closed?this.oauthPopupWindow=window.open(t,e,i):this.previousUrl!==this.auth.authURI.toString()?(this.oauthPopupWindow=window.open(t,e,i),this.oauthPopupWindow&&!this.oauthPopupWindow.closed&&void 0!==this.oauthPopupWindow.closed||alert("popup blocked"),null===(s=this.oauthPopupWindow)||void 0===s||s.focus()):this.oauthPopupWindow.focus(),window.addEventListener("message",this.receiveMessage,!1),this.previousUrl=this.auth.authURI}async componentWillLoad(){this.auth=new l(this.redirectURI,this.clientID),this.code&&(a.state.code=this.code,await this.auth.getAccessToken(),this.authCancel.emit(),this.authSuccess.emit()),!1===a.state.isAuthorized&&(this.auth.generateCodeVerifier(),await this.auth.generateCodeChallenge(a.state.codeVerifier),this.auth.buildAuthURI()),!this.hidelogin||"button"!==this.trigger&&"file"!==this.trigger||(a.state.isAuthorized?(this.authCancel.emit(),this.authSuccess.emit()):this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login"))}render(){return i(o,{key:"c00096b96d6d21508d1a78d5ae5a7f552516d01f"},!this.hidelogin||"button"!==this.trigger&&"file"!==this.trigger?i("ezp-dialog",{heading:h.t("login_dialog.heading"),description:h.t("login_dialog.description"),action:h.t("login_dialog.action"),iconName:"logo",iconSize:"huge",iconFramed:!1,instance:"login"}):i("ezp-status",{description:h.t("login_dialog.action"),processing:!0,cancel:!0}))}static get style(){return":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}"}},[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]]);function b(){"undefined"!=typeof customElements&&["ezp-auth","ezp-dialog","ezp-icon","ezp-icon-button","ezp-label","ezp-status","ezp-text-button"].forEach((t=>{switch(t){case"ezp-auth":customElements.get(n(t))||customElements.define(n(t),z);break;case"ezp-dialog":customElements.get(n(t))||r();break;case"ezp-icon":customElements.get(n(t))||d();break;case"ezp-icon-button":customElements.get(n(t))||u();break;case"ezp-label":customElements.get(n(t))||p();break;case"ezp-status":customElements.get(n(t))||m();break;case"ezp-text-button":customElements.get(n(t))||g()}}))}export{z as E,b as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as r,Host as o,transformTag as n}from"@stencil/core/internal/client";import{d as a}from"./ezp-icon2.js";import{d as p}from"./ezp-label2.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.inputValueChanged=i(this,"inputValueChanged",7),this.timeout=null,this.label="Label",this.type="text",this.icon="color",this.placeholder="",this.focused=!1,this.setFocus=()=>{var e;null===(e=this.input)||void 0===e||e.focus()},this.handleBlur=()=>{this.focused=!1},this.handleFocus=()=>{this.focused=!0}}handleChange(e){this.timeout&&clearTimeout(this.timeout);const t=e.target;this.value=t.value?t.value:"number"===this.type?0:"",this.timeout=setTimeout((()=>{this.inputValueChanged.emit({type:this.eventType.toLowerCase(),value:this.value})}),500)}render(){return r(o,{key:"ba8958137bce0592dbe4ec23c03284885f570e27",class:{focused:this.focused},onClick:this.setFocus},r("ezp-icon",{key:"9d3b108841ffdabec9b9a98d6d6b2ea19fba37fc",id:"icon",name:this.icon}),r("ezp-label",{key:"5fee00202e9c6407bddf8a1b7090d983d79e42b3",id:"label",noWrap:!0,level:"secondary",text:this.label}),r("input",{key:"99c71e9c6d29193046bd0b6094efbac828ffab15",id:"input",type:this.type,value:this.value,placeholder:this.placeholder,"aria-label":this.label,onInput:e=>this.handleChange(e),ref:e=>this.input=e,onFocus:this.handleFocus,onBlur:this.handleBlur}),this.suffix?r("ezp-label",{id:"suffix",level:"secondary",text:this.suffix}):null)}static get style(){return':host{-ms-flex-align:center;align-items:center;background:transparent;cursor:text;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-input-grid-template, auto/auto auto 1fr);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:var(--ezp-input-z-index, 3)}:host([suffix]){--ezp-input-grid-template:auto / auto auto 1fr auto;--ezp-input-input-padding-right:0}:host(.focused){--ezp-input-label-color:var(--ezp-core-foreground-primary)}#label{color:var(--ezp-input-label-color, var(--ezp-core-foreground-primary))}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-input-icon-color, var(--ezp-theme-solid))}#input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:text;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:14px;font-weight:600;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0062235443em;margin:0;outline:none;padding:0 var(--ezp-input-input-padding-right, var(--ezp-spacing-1)) 0 0;text-align:right;width:100%}#input::-webkit-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-moz-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input:-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input[type=number]::-webkit-inner-spin-button,#input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}#suffix{color:var(--ezp-core-foreground-tertiary)}'}},[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}]);function l(){"undefined"!=typeof customElements&&["ezp-input","ezp-icon","ezp-label"].forEach((e=>{switch(e){case"ezp-input":customElements.get(n(e))||customElements.define(n(e),s);break;case"ezp-icon":customElements.get(n(e))||a();break;case"ezp-label":customElements.get(n(e))||p()}}))}export{s as E,l as d}
|