@glatam/calendar-ui 1.0.2 → 1.0.4
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/components/calendar-modal.d.ts +24 -0
- package/dist/components/calendar-modal.d.ts.map +1 -0
- package/dist/glatam-calendar-mini.d.ts +38 -0
- package/dist/glatam-calendar-mini.d.ts.map +1 -0
- package/dist/glatam-calendar.cjs +836 -0
- package/dist/glatam-calendar.d.ts +58 -0
- package/dist/glatam-calendar.d.ts.map +1 -0
- package/dist/glatam-calendar.js +1541 -0
- package/{src/index.ts → dist/index.d.ts} +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/styles/calendar-modal.css.d.ts +2 -0
- package/dist/styles/calendar-modal.css.d.ts.map +1 -0
- package/dist/styles/calendar.css.d.ts +2 -0
- package/dist/styles/calendar.css.d.ts.map +1 -0
- package/dist/styles/variables.css.d.ts +2 -0
- package/dist/styles/variables.css.d.ts.map +1 -0
- package/dist/utils/timezone-utils.d.ts +16 -0
- package/dist/utils/timezone-utils.d.ts.map +1 -0
- package/dist/views/day-view.d.ts +27 -0
- package/dist/views/day-view.d.ts.map +1 -0
- package/dist/views/month-view.d.ts +23 -0
- package/dist/views/month-view.d.ts.map +1 -0
- package/dist/views/week-view.d.ts +28 -0
- package/dist/views/week-view.d.ts.map +1 -0
- package/package.json +6 -2
- package/src/components/calendar-modal.ts +0 -163
- package/src/glatam-calendar-mini.ts +0 -147
- package/src/glatam-calendar.ts +0 -194
- package/src/styles/calendar-modal.css.ts +0 -158
- package/src/styles/calendar.css.ts +0 -259
- package/src/styles/variables.css.ts +0 -91
- package/src/utils/timezone-utils.ts +0 -87
- package/src/views/day-view.ts +0 -130
- package/src/views/month-view.ts +0 -117
- package/src/views/week-view.ts +0 -158
- package/tsconfig.json +0 -8
- package/vite.config.ts +0 -35
|
@@ -0,0 +1,1541 @@
|
|
|
1
|
+
import { css as E, LitElement as O, html as d } from "lit";
|
|
2
|
+
import { property as s, customElement as T, state as u } from "lit/decorators.js";
|
|
3
|
+
import { isTimeBlocked as I, formatISODate as _, generateMonthDays as A, generateWeekDays as j } from "@glatam/calendar-core";
|
|
4
|
+
import { formatISODate as nt, isTimeBlocked as dt, parseISODate as ct } from "@glatam/calendar-core";
|
|
5
|
+
import { classMap as N } from "lit/directives/class-map.js";
|
|
6
|
+
const P = E`
|
|
7
|
+
:host {
|
|
8
|
+
/* Fonts */
|
|
9
|
+
--glatam-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
10
|
+
|
|
11
|
+
/* Colors - Premium Apple Light Theme */
|
|
12
|
+
--glatam-primary: #5856d6;
|
|
13
|
+
--glatam-primary-hover: #4745b4;
|
|
14
|
+
--glatam-primary-light: rgba(88, 86, 214, 0.1);
|
|
15
|
+
--glatam-primary-light-hover: rgba(88, 86, 214, 0.25);
|
|
16
|
+
|
|
17
|
+
--glatam-bg: #ffffff;
|
|
18
|
+
--glatam-surface: #f5f5f7;
|
|
19
|
+
--glatam-border: #e5e5ea;
|
|
20
|
+
--glatam-text: #1d1d1f;
|
|
21
|
+
--glatam-text-secondary: #86868b;
|
|
22
|
+
--glatam-text-light: #ffffff;
|
|
23
|
+
|
|
24
|
+
/* Blocked/Unavailable states */
|
|
25
|
+
--glatam-blocked-bg: #fcfcfd;
|
|
26
|
+
--glatam-blocked-stripe: #f2f2f7;
|
|
27
|
+
--glatam-blocked-text: #aeaeae;
|
|
28
|
+
--glatam-blocked-border: #e5e5ea;
|
|
29
|
+
|
|
30
|
+
/* Selection Colors */
|
|
31
|
+
--glatam-selection-bg: rgba(88, 86, 214, 0.15);
|
|
32
|
+
--glatam-selection-border: #5856d6;
|
|
33
|
+
|
|
34
|
+
/* Today highlighting */
|
|
35
|
+
--glatam-today-text: #5856d6;
|
|
36
|
+
--glatam-today-bg: rgba(88, 86, 214, 0.08);
|
|
37
|
+
|
|
38
|
+
/* Dimensions & Layout */
|
|
39
|
+
--glatam-border-radius: 12px;
|
|
40
|
+
--glatam-padding: 16px;
|
|
41
|
+
--glatam-grid-border-radius: 8px;
|
|
42
|
+
--glatam-day-min-height: 72px;
|
|
43
|
+
--glatam-time-col-width: 60px;
|
|
44
|
+
--glatam-slot-height: 48px;
|
|
45
|
+
|
|
46
|
+
/* Animation duration */
|
|
47
|
+
--glatam-transition-fast: 0.15s ease;
|
|
48
|
+
--glatam-transition-normal: 0.25s ease;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host(.dark-mode) {
|
|
52
|
+
/* Colors - Premium Apple Dark Theme */
|
|
53
|
+
--glatam-primary: #5e5ce6;
|
|
54
|
+
--glatam-primary-hover: #7d7aff;
|
|
55
|
+
--glatam-primary-light: rgba(94, 92, 230, 0.15);
|
|
56
|
+
--glatam-primary-light-hover: rgba(94, 92, 230, 0.3);
|
|
57
|
+
|
|
58
|
+
--glatam-bg: #1c1c1e;
|
|
59
|
+
--glatam-surface: #2c2c2e;
|
|
60
|
+
--glatam-border: #38383a;
|
|
61
|
+
--glatam-text: #f5f5f7;
|
|
62
|
+
--glatam-text-secondary: #8e8e93;
|
|
63
|
+
|
|
64
|
+
/* Blocked/Unavailable states */
|
|
65
|
+
--glatam-blocked-bg: #242426;
|
|
66
|
+
--glatam-blocked-stripe: #2c2c2e;
|
|
67
|
+
--glatam-blocked-text: #707074;
|
|
68
|
+
--glatam-blocked-border: #38383a;
|
|
69
|
+
|
|
70
|
+
/* Selection Colors */
|
|
71
|
+
--glatam-selection-bg: rgba(94, 92, 230, 0.25);
|
|
72
|
+
--glatam-selection-border: #5e5ce6;
|
|
73
|
+
|
|
74
|
+
/* Today highlighting */
|
|
75
|
+
--glatam-today-text: #7d7aff;
|
|
76
|
+
--glatam-today-bg: rgba(94, 92, 230, 0.12);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host([size="small"]) {
|
|
80
|
+
--glatam-day-min-height: 48px;
|
|
81
|
+
--glatam-slot-height: 36px;
|
|
82
|
+
--glatam-time-col-width: 48px;
|
|
83
|
+
--glatam-padding: 10px;
|
|
84
|
+
font-size: 0.8rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([size="large"]) {
|
|
88
|
+
--glatam-day-min-height: 96px;
|
|
89
|
+
--glatam-slot-height: 60px;
|
|
90
|
+
--glatam-time-col-width: 72px;
|
|
91
|
+
--glatam-padding: 24px;
|
|
92
|
+
font-size: 1.1rem;
|
|
93
|
+
}
|
|
94
|
+
`, W = E`
|
|
95
|
+
:host {
|
|
96
|
+
display: grid;
|
|
97
|
+
min-width: 0;
|
|
98
|
+
font-family: var(--glatam-font-family);
|
|
99
|
+
color: var(--glatam-text);
|
|
100
|
+
background-color: var(--glatam-bg);
|
|
101
|
+
border-radius: var(--glatam-border-radius);
|
|
102
|
+
padding: var(--glatam-padding);
|
|
103
|
+
box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
|
|
104
|
+
border: 1px solid var(--glatam-border);
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
width: 100%;
|
|
107
|
+
max-width: 100%;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
transition: background-color var(--glatam-transition-normal), border-color var(--glatam-transition-normal);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
*, *::before, *::after {
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.calendar-header {
|
|
117
|
+
display: flex;
|
|
118
|
+
justify-content: space-between;
|
|
119
|
+
align-items: center;
|
|
120
|
+
margin-bottom: var(--glatam-padding);
|
|
121
|
+
flex-wrap: wrap;
|
|
122
|
+
gap: 12px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.nav-group, .view-group {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: 8px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.nav-title {
|
|
132
|
+
font-size: 1.25rem;
|
|
133
|
+
font-weight: 600;
|
|
134
|
+
min-width: 140px;
|
|
135
|
+
text-align: center;
|
|
136
|
+
letter-spacing: -0.01em;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.btn {
|
|
140
|
+
font-family: inherit;
|
|
141
|
+
font-size: 0.875rem;
|
|
142
|
+
font-weight: 500;
|
|
143
|
+
padding: 8px 12px;
|
|
144
|
+
border-radius: 8px;
|
|
145
|
+
border: 1px solid var(--glatam-border);
|
|
146
|
+
background-color: var(--glatam-bg);
|
|
147
|
+
color: var(--glatam-text);
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
transition: background-color var(--glatam-transition-fast), border-color var(--glatam-transition-fast), transform var(--glatam-transition-fast);
|
|
150
|
+
display: inline-flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
min-width: 36px;
|
|
154
|
+
height: 36px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.btn:hover:not(:disabled) {
|
|
158
|
+
background-color: var(--glatam-surface);
|
|
159
|
+
border-color: var(--glatam-text-secondary);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.btn:active:not(:disabled) {
|
|
163
|
+
transform: scale(0.97);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.btn:disabled {
|
|
167
|
+
opacity: 0.5;
|
|
168
|
+
cursor: not-allowed;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.btn-primary {
|
|
172
|
+
background-color: var(--glatam-primary);
|
|
173
|
+
color: var(--glatam-text-light);
|
|
174
|
+
border: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.btn-primary:hover:not(:disabled) {
|
|
178
|
+
background-color: var(--glatam-primary-hover);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.btn-group {
|
|
182
|
+
display: flex;
|
|
183
|
+
border-radius: 8px;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
border: 1px solid var(--glatam-border);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.btn-group .btn {
|
|
189
|
+
border-radius: 0;
|
|
190
|
+
border: none;
|
|
191
|
+
border-right: 1px solid var(--glatam-border);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.btn-group .btn:last-child {
|
|
195
|
+
border-right: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.btn-group .btn.active {
|
|
199
|
+
background-color: var(--glatam-primary-light);
|
|
200
|
+
color: var(--glatam-primary);
|
|
201
|
+
font-weight: 600;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Timezone Selector Styles */
|
|
205
|
+
.timezone-badge {
|
|
206
|
+
font-size: 0.75rem;
|
|
207
|
+
padding: 4px 8px;
|
|
208
|
+
background: var(--glatam-surface);
|
|
209
|
+
border: 1px solid var(--glatam-border);
|
|
210
|
+
border-radius: 20px;
|
|
211
|
+
display: inline-flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
gap: 4px;
|
|
214
|
+
color: var(--glatam-text-secondary);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.timezone-select {
|
|
218
|
+
background: transparent;
|
|
219
|
+
border: none;
|
|
220
|
+
color: var(--glatam-text);
|
|
221
|
+
font-family: inherit;
|
|
222
|
+
font-size: 0.75rem;
|
|
223
|
+
font-weight: 600;
|
|
224
|
+
cursor: pointer;
|
|
225
|
+
outline: none;
|
|
226
|
+
padding-right: 4px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Mini Popover Variant Styles */
|
|
230
|
+
.dropdown-container {
|
|
231
|
+
position: relative;
|
|
232
|
+
display: inline-block;
|
|
233
|
+
width: 100%;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.dropdown-toggle {
|
|
237
|
+
width: 100%;
|
|
238
|
+
justify-content: space-between;
|
|
239
|
+
padding: 12px 16px;
|
|
240
|
+
border-radius: 12px;
|
|
241
|
+
font-weight: 600;
|
|
242
|
+
height: 48px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.dropdown-card {
|
|
246
|
+
position: absolute;
|
|
247
|
+
top: calc(100% + 8px);
|
|
248
|
+
left: 0;
|
|
249
|
+
width: 320px;
|
|
250
|
+
background: var(--glatam-bg);
|
|
251
|
+
border-radius: 16px;
|
|
252
|
+
border: 1px solid var(--glatam-border);
|
|
253
|
+
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
|
|
254
|
+
z-index: 100;
|
|
255
|
+
padding: 16px;
|
|
256
|
+
display: flex;
|
|
257
|
+
flex-direction: column;
|
|
258
|
+
gap: 12px;
|
|
259
|
+
animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.slot-list {
|
|
263
|
+
display: flex;
|
|
264
|
+
flex-direction: column;
|
|
265
|
+
gap: 8px;
|
|
266
|
+
max-height: 220px;
|
|
267
|
+
overflow-y: auto;
|
|
268
|
+
padding-right: 4px;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.slot-btn {
|
|
272
|
+
width: 100%;
|
|
273
|
+
padding: 10px;
|
|
274
|
+
border-radius: 8px;
|
|
275
|
+
border: 1px solid var(--glatam-border);
|
|
276
|
+
background: var(--glatam-bg);
|
|
277
|
+
color: var(--glatam-text);
|
|
278
|
+
cursor: pointer;
|
|
279
|
+
font-family: inherit;
|
|
280
|
+
font-size: 0.85rem;
|
|
281
|
+
font-weight: 500;
|
|
282
|
+
text-align: center;
|
|
283
|
+
transition: background-color var(--glatam-transition-fast);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.slot-btn:hover:not(.blocked) {
|
|
287
|
+
background-color: var(--glatam-surface);
|
|
288
|
+
border-color: var(--glatam-text-secondary);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.slot-btn.blocked {
|
|
292
|
+
background-color: var(--glatam-surface);
|
|
293
|
+
color: var(--glatam-blocked-text);
|
|
294
|
+
text-decoration: line-through;
|
|
295
|
+
cursor: not-allowed;
|
|
296
|
+
border-color: var(--glatam-border);
|
|
297
|
+
opacity: 0.6;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/* Smooth Apple Animation */
|
|
301
|
+
.calendar-body {
|
|
302
|
+
position: relative;
|
|
303
|
+
width: 100%;
|
|
304
|
+
overflow-x: auto;
|
|
305
|
+
animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
@keyframes fadeInUp {
|
|
309
|
+
from {
|
|
310
|
+
opacity: 0;
|
|
311
|
+
transform: translateY(8px) scale(0.995);
|
|
312
|
+
}
|
|
313
|
+
to {
|
|
314
|
+
opacity: 1;
|
|
315
|
+
transform: translateY(0) scale(1);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
@media (max-width: 600px) {
|
|
320
|
+
:host {
|
|
321
|
+
padding: 8px;
|
|
322
|
+
}
|
|
323
|
+
.calendar-header {
|
|
324
|
+
flex-direction: column;
|
|
325
|
+
align-items: stretch;
|
|
326
|
+
gap: 10px;
|
|
327
|
+
}
|
|
328
|
+
.nav-group, .view-group {
|
|
329
|
+
width: 100%;
|
|
330
|
+
justify-content: space-between;
|
|
331
|
+
flex-wrap: wrap;
|
|
332
|
+
gap: 6px;
|
|
333
|
+
}
|
|
334
|
+
.nav-title {
|
|
335
|
+
flex: 1;
|
|
336
|
+
font-size: 1.1rem;
|
|
337
|
+
min-width: unset;
|
|
338
|
+
text-align: right;
|
|
339
|
+
white-space: nowrap;
|
|
340
|
+
overflow: hidden;
|
|
341
|
+
text-overflow: ellipsis;
|
|
342
|
+
}
|
|
343
|
+
.btn {
|
|
344
|
+
font-size: 0.8rem;
|
|
345
|
+
padding: 6px 10px;
|
|
346
|
+
height: 32px;
|
|
347
|
+
min-width: 32px;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
`;
|
|
351
|
+
function C(e, t, a) {
|
|
352
|
+
if (t === a) return 0;
|
|
353
|
+
const i = (r, l) => {
|
|
354
|
+
const o = {
|
|
355
|
+
year: "numeric",
|
|
356
|
+
month: "numeric",
|
|
357
|
+
day: "numeric",
|
|
358
|
+
hour: "numeric",
|
|
359
|
+
minute: "numeric",
|
|
360
|
+
second: "numeric",
|
|
361
|
+
hour12: !1
|
|
362
|
+
};
|
|
363
|
+
l !== "local" && (o.timeZone = l);
|
|
364
|
+
const n = new Intl.DateTimeFormat("en-US", o).formatToParts(r), c = new Map(n.map(($) => [$.type, $.value])), m = Number(c.get("hour")), y = m === 24 ? 0 : m;
|
|
365
|
+
return new Date(
|
|
366
|
+
Number(c.get("year")),
|
|
367
|
+
Number(c.get("month")) - 1,
|
|
368
|
+
Number(c.get("day")),
|
|
369
|
+
y,
|
|
370
|
+
Number(c.get("minute")),
|
|
371
|
+
Number(c.get("second"))
|
|
372
|
+
);
|
|
373
|
+
};
|
|
374
|
+
try {
|
|
375
|
+
const r = i(e, t);
|
|
376
|
+
return (i(e, a).getTime() - r.getTime()) / (60 * 1e3);
|
|
377
|
+
} catch {
|
|
378
|
+
return 0;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
function U(e, t) {
|
|
382
|
+
if (t === 0)
|
|
383
|
+
return { start: e.start, end: e.end, dayShift: 0 };
|
|
384
|
+
const a = (c) => {
|
|
385
|
+
const [m, y] = c.split(":").map(Number);
|
|
386
|
+
return m * 60 + y;
|
|
387
|
+
}, i = (c) => {
|
|
388
|
+
let m = c % 1440;
|
|
389
|
+
m < 0 && (m += 1440);
|
|
390
|
+
const y = String(Math.floor(m / 60)).padStart(2, "0"), $ = String(m % 60).padStart(2, "0");
|
|
391
|
+
return `${y}:${$}`;
|
|
392
|
+
}, r = a(e.start), l = a(e.end), o = r + t, p = l + t;
|
|
393
|
+
let n = 0;
|
|
394
|
+
return o < 0 ? n = -1 : o >= 1440 && (n = 1), {
|
|
395
|
+
start: i(o),
|
|
396
|
+
end: i(p),
|
|
397
|
+
dayShift: n
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
var L = Object.defineProperty, F = Object.getOwnPropertyDescriptor, D = (e, t, a, i) => {
|
|
401
|
+
for (var r = i > 1 ? void 0 : i ? F(t, a) : t, l = e.length - 1, o; l >= 0; l--)
|
|
402
|
+
(o = e[l]) && (r = (i ? o(t, a, r) : o(r)) || r);
|
|
403
|
+
return i && r && L(t, a, r), r;
|
|
404
|
+
};
|
|
405
|
+
let f = class extends O {
|
|
406
|
+
constructor() {
|
|
407
|
+
super(...arguments), this.days = [], this.locale = "es", this.startOfWeekDay = 0, this.selectedDates = [], this.role = "provider", this.size = "medium", this.minDate = "", this.maxDate = "", this.showNeighboringMonth = !0, this.tileClassName = null;
|
|
408
|
+
}
|
|
409
|
+
getWeekdayNames() {
|
|
410
|
+
const e = [], t = new Date(2026, 6, 12 + this.startOfWeekDay), a = new Intl.DateTimeFormat(this.locale, { weekday: "short" });
|
|
411
|
+
for (let i = 0; i < 7; i++)
|
|
412
|
+
e.push(a.format(t)), t.setDate(t.getDate() + 1);
|
|
413
|
+
return e;
|
|
414
|
+
}
|
|
415
|
+
handleDayClick(e) {
|
|
416
|
+
const t = this.minDate && e.dateString < this.minDate || this.maxDate && e.dateString > this.maxDate;
|
|
417
|
+
this.role === "buyer" && (e.isBlocked || t) || this.dispatchEvent(new CustomEvent("day-select", {
|
|
418
|
+
detail: { dateString: e.dateString, isBlocked: e.isBlocked },
|
|
419
|
+
bubbles: !0,
|
|
420
|
+
composed: !0
|
|
421
|
+
}));
|
|
422
|
+
}
|
|
423
|
+
render() {
|
|
424
|
+
const e = this.getWeekdayNames();
|
|
425
|
+
return d`
|
|
426
|
+
${e.map((t) => d`<div class="weekday">${t}</div>`)}
|
|
427
|
+
|
|
428
|
+
${this.days.map((t) => {
|
|
429
|
+
var p;
|
|
430
|
+
if (!t.isCurrentMonth && !this.showNeighboringMonth)
|
|
431
|
+
return d`<div class="day-cell empty"></div>`;
|
|
432
|
+
const a = t.dateString === (/* @__PURE__ */ new Date()).toISOString().split("T")[0], i = this.selectedDates.includes(t.dateString), r = t.slots.filter((n) => n.isBlocked), l = this.minDate && t.dateString < this.minDate || this.maxDate && t.dateString > this.maxDate, o = this.tileClassName ? this.tileClassName({ date: t.date, dateString: t.dateString }) : "";
|
|
433
|
+
return d`
|
|
434
|
+
<div
|
|
435
|
+
class=${N({
|
|
436
|
+
"day-cell": !0,
|
|
437
|
+
padding: !t.isCurrentMonth,
|
|
438
|
+
blocked: t.isBlocked,
|
|
439
|
+
today: a,
|
|
440
|
+
selected: i,
|
|
441
|
+
disabled: !!l,
|
|
442
|
+
[o]: !!o
|
|
443
|
+
})}
|
|
444
|
+
part="day-cell ${o}"
|
|
445
|
+
@click=${() => this.handleDayClick(t)}
|
|
446
|
+
>
|
|
447
|
+
<div class="day-number">${t.dayNumber}</div>
|
|
448
|
+
|
|
449
|
+
<div class="slot-indicator">
|
|
450
|
+
${t.isBlocked ? d`<div class="badge blocked-day">${((p = t.rule) == null ? void 0 : p.description) || "Bloqueado"}</div>` : r.slice(0, 2).map((n) => {
|
|
451
|
+
var c, m;
|
|
452
|
+
return d`
|
|
453
|
+
<div class="badge blocked-slot" title=${((c = n.rule) == null ? void 0 : c.description) || ""}>
|
|
454
|
+
🚫 ${((m = n.rule) == null ? void 0 : m.description) || n.start}
|
|
455
|
+
</div>
|
|
456
|
+
`;
|
|
457
|
+
})}
|
|
458
|
+
${!t.isBlocked && r.length > 2 ? d`<div style="text-align: center; font-size: 0.65rem; color: var(--glatam-text-secondary);">+${r.length - 2} tareas</div>` : ""}
|
|
459
|
+
</div>
|
|
460
|
+
</div>
|
|
461
|
+
`;
|
|
462
|
+
})}
|
|
463
|
+
`;
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
f.styles = E`
|
|
467
|
+
:host { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; }
|
|
468
|
+
.weekday { font-size: 0.75rem; font-weight: 600; color: var(--glatam-text-secondary); text-transform: uppercase; text-align: center; padding: 8px 0; letter-spacing: 0.05em; }
|
|
469
|
+
.day-cell {
|
|
470
|
+
min-height: var(--glatam-day-min-height); border: 1px solid var(--glatam-border); border-radius: var(--glatam-grid-border-radius);
|
|
471
|
+
padding: 8px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer;
|
|
472
|
+
transition: background-color var(--glatam-transition-fast), border-color var(--glatam-transition-fast); background-color: var(--glatam-bg); position: relative;
|
|
473
|
+
}
|
|
474
|
+
.day-cell:hover:not(.blocked):not(.disabled) { background-color: var(--glatam-surface); border-color: var(--glatam-text-secondary); }
|
|
475
|
+
.day-cell.padding { opacity: 0.4; }
|
|
476
|
+
.day-cell.blocked {
|
|
477
|
+
background: repeating-linear-gradient(45deg, var(--glatam-blocked-bg), var(--glatam-blocked-bg) 10px, var(--glatam-blocked-stripe) 10px, var(--glatam-blocked-stripe) 20px);
|
|
478
|
+
border-color: var(--glatam-blocked-border); color: var(--glatam-blocked-text); cursor: not-allowed;
|
|
479
|
+
}
|
|
480
|
+
.day-cell.today { background-color: var(--glatam-today-bg); border-color: var(--glatam-primary); }
|
|
481
|
+
.day-cell.selected { background-color: var(--glatam-selection-bg); border-color: var(--glatam-selection-border); box-shadow: inset 0 0 0 1px var(--glatam-selection-border); }
|
|
482
|
+
.day-cell.disabled { opacity: 0.2; cursor: not-allowed; background-color: var(--glatam-surface); border-color: var(--glatam-border); pointer-events: none; }
|
|
483
|
+
.day-cell.empty { border: none; background: transparent; cursor: default; pointer-events: none; }
|
|
484
|
+
.day-number { font-size: 0.875rem; font-weight: 500; margin-bottom: 4px; }
|
|
485
|
+
.day-cell.today .day-number { color: var(--glatam-today-text); font-weight: 700; }
|
|
486
|
+
.slot-indicator { display: flex; flex-direction: column; gap: 3px; font-size: 0.7rem; overflow: hidden; margin-top: 4px; }
|
|
487
|
+
.badge { padding: 2px 6px; border-radius: 4px; font-weight: 500; text-align: center; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
|
|
488
|
+
.badge.blocked-day { background-color: rgba(255, 69, 58, 0.12); color: #ff453a; font-weight: 600; }
|
|
489
|
+
.badge.blocked-slot { background-color: var(--glatam-surface); border: 1px solid var(--glatam-border); color: var(--glatam-text-secondary); }
|
|
490
|
+
:host([size="small"]) .day-cell { min-height: 38px; padding: 4px; justify-content: center; align-items: center; }
|
|
491
|
+
:host([size="small"]) .slot-indicator { display: none; }
|
|
492
|
+
:host([size="small"]) .day-number { margin-bottom: 0; font-size: 0.8rem; }
|
|
493
|
+
@media (max-width: 600px) {
|
|
494
|
+
.day-cell { min-height: 38px; padding: 4px; justify-content: center; align-items: center; }
|
|
495
|
+
.slot-indicator { display: none; }
|
|
496
|
+
.day-number { margin-bottom: 0; font-size: 0.8rem; }
|
|
497
|
+
}
|
|
498
|
+
`;
|
|
499
|
+
D([
|
|
500
|
+
s({ type: Array })
|
|
501
|
+
], f.prototype, "days", 2);
|
|
502
|
+
D([
|
|
503
|
+
s({ type: String })
|
|
504
|
+
], f.prototype, "locale", 2);
|
|
505
|
+
D([
|
|
506
|
+
s({ type: Number })
|
|
507
|
+
], f.prototype, "startOfWeekDay", 2);
|
|
508
|
+
D([
|
|
509
|
+
s({ type: Array })
|
|
510
|
+
], f.prototype, "selectedDates", 2);
|
|
511
|
+
D([
|
|
512
|
+
s({ type: String })
|
|
513
|
+
], f.prototype, "role", 2);
|
|
514
|
+
D([
|
|
515
|
+
s({ type: String, reflect: !0 })
|
|
516
|
+
], f.prototype, "size", 2);
|
|
517
|
+
D([
|
|
518
|
+
s({ type: String })
|
|
519
|
+
], f.prototype, "minDate", 2);
|
|
520
|
+
D([
|
|
521
|
+
s({ type: String })
|
|
522
|
+
], f.prototype, "maxDate", 2);
|
|
523
|
+
D([
|
|
524
|
+
s({ type: Boolean })
|
|
525
|
+
], f.prototype, "showNeighboringMonth", 2);
|
|
526
|
+
D([
|
|
527
|
+
s({ attribute: !1 })
|
|
528
|
+
], f.prototype, "tileClassName", 2);
|
|
529
|
+
f = D([
|
|
530
|
+
T("glatam-calendar-month-view")
|
|
531
|
+
], f);
|
|
532
|
+
var H = Object.defineProperty, q = Object.getOwnPropertyDescriptor, R = (e, t, a, i) => {
|
|
533
|
+
for (var r = i > 1 ? void 0 : i ? q(t, a) : t, l = e.length - 1, o; l >= 0; l--)
|
|
534
|
+
(o = e[l]) && (r = (i ? o(t, a, r) : o(r)) || r);
|
|
535
|
+
return i && r && H(t, a, r), r;
|
|
536
|
+
};
|
|
537
|
+
let w = class extends O {
|
|
538
|
+
constructor() {
|
|
539
|
+
super(...arguments), this.days = [], this.slots = [], this.locale = "es", this.selectedRange = null, this.role = "provider", this.isDragging = !1, this.dragDayIndex = null, this.dragStartSlotIndex = null, this.dragEndSlotIndex = null, this.handleMouseUp = () => {
|
|
540
|
+
if (!this.isDragging || this.dragDayIndex === null || this.dragStartSlotIndex === null || this.dragEndSlotIndex === null) {
|
|
541
|
+
this.isDragging = !1;
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
this.isDragging = !1;
|
|
545
|
+
const e = Math.min(this.dragStartSlotIndex, this.dragEndSlotIndex), t = Math.max(this.dragStartSlotIndex, this.dragEndSlotIndex), a = this.days[this.dragDayIndex], i = a.slots.slice(e, t + 1);
|
|
546
|
+
i.some((r) => r.isBlocked) || this.dispatchEvent(new CustomEvent("range-select", {
|
|
547
|
+
detail: { dateString: a.dateString, start: i[0].start, end: i[i.length - 1].end },
|
|
548
|
+
bubbles: !0,
|
|
549
|
+
composed: !0
|
|
550
|
+
})), this.dragDayIndex = null, this.dragStartSlotIndex = null, this.dragEndSlotIndex = null;
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
connectedCallback() {
|
|
554
|
+
super.connectedCallback(), window.addEventListener("mouseup", this.handleMouseUp);
|
|
555
|
+
}
|
|
556
|
+
disconnectedCallback() {
|
|
557
|
+
window.removeEventListener("mouseup", this.handleMouseUp), super.disconnectedCallback();
|
|
558
|
+
}
|
|
559
|
+
handleMouseDown(e, t, a) {
|
|
560
|
+
if (a) {
|
|
561
|
+
if (this.role === "buyer") return;
|
|
562
|
+
this.dispatchEvent(new CustomEvent("slot-click", {
|
|
563
|
+
detail: { dateString: this.days[e].dateString, slot: this.days[e].slots[t], isBlocked: !0 },
|
|
564
|
+
bubbles: !0,
|
|
565
|
+
composed: !0
|
|
566
|
+
}));
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
this.isDragging = !0, this.dragDayIndex = e, this.dragStartSlotIndex = t, this.dragEndSlotIndex = t;
|
|
570
|
+
}
|
|
571
|
+
handleMouseEnter(e, t, a) {
|
|
572
|
+
this.isDragging && e === this.dragDayIndex && !a && (this.dragEndSlotIndex = t);
|
|
573
|
+
}
|
|
574
|
+
isSlotSelected(e, t) {
|
|
575
|
+
return !this.selectedRange || this.selectedRange.dateString !== e ? !1 : t.start >= this.selectedRange.start && t.end <= this.selectedRange.end;
|
|
576
|
+
}
|
|
577
|
+
isSlotDragSelecting(e, t) {
|
|
578
|
+
if (!this.isDragging || e !== this.dragDayIndex) return !1;
|
|
579
|
+
const a = Math.min(this.dragStartSlotIndex, this.dragEndSlotIndex), i = Math.max(this.dragStartSlotIndex, this.dragEndSlotIndex);
|
|
580
|
+
return t >= a && t <= i;
|
|
581
|
+
}
|
|
582
|
+
render() {
|
|
583
|
+
const e = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
584
|
+
return d`
|
|
585
|
+
<div class="time-col">
|
|
586
|
+
<div class="header-cell">Hora</div>
|
|
587
|
+
${this.slots.map((t) => d`<div class="slot-cell time-slot-label">${t.start}</div>`)}
|
|
588
|
+
</div>
|
|
589
|
+
|
|
590
|
+
${this.days.map((t, a) => {
|
|
591
|
+
const i = t.dateString === e, r = new Intl.DateTimeFormat(this.locale, { weekday: "short" }).format(t.date);
|
|
592
|
+
return d`
|
|
593
|
+
<div class="day-col">
|
|
594
|
+
<div class="header-cell ${i ? "today" : ""}">
|
|
595
|
+
<div>${r}</div>
|
|
596
|
+
<div class="day-num">${t.dayNumber}</div>
|
|
597
|
+
</div>
|
|
598
|
+
|
|
599
|
+
${t.slots.map((l, o) => {
|
|
600
|
+
var m, y;
|
|
601
|
+
const p = l.isBlocked, n = this.isSlotSelected(t.dateString, l), c = this.isSlotDragSelecting(a, o);
|
|
602
|
+
return d`
|
|
603
|
+
<div
|
|
604
|
+
class=${N({
|
|
605
|
+
"slot-cell": !0,
|
|
606
|
+
available: !p,
|
|
607
|
+
blocked: p,
|
|
608
|
+
selected: n,
|
|
609
|
+
"drag-selecting": c
|
|
610
|
+
})}
|
|
611
|
+
@mousedown=${() => this.handleMouseDown(a, o, p)}
|
|
612
|
+
@mouseenter=${() => this.handleMouseEnter(a, o, p)}
|
|
613
|
+
title=${p && ((m = l.rule) != null && m.description) ? l.rule.description : ""}
|
|
614
|
+
>
|
|
615
|
+
${p ? ((y = l.rule) == null ? void 0 : y.description) || "Ocupado" : n ? "Reservado" : ""}
|
|
616
|
+
</div>
|
|
617
|
+
`;
|
|
618
|
+
})}
|
|
619
|
+
</div>
|
|
620
|
+
`;
|
|
621
|
+
})}
|
|
622
|
+
`;
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
w.styles = E`
|
|
626
|
+
:host {
|
|
627
|
+
display: grid; grid-template-columns: var(--glatam-time-col-width) repeat(7, 1fr); gap: 2px;
|
|
628
|
+
width: 100%; background-color: var(--glatam-border); border: 1px solid var(--glatam-border);
|
|
629
|
+
border-radius: var(--glatam-grid-border-radius); overflow: hidden; user-select: none;
|
|
630
|
+
}
|
|
631
|
+
@media (max-width: 600px) {
|
|
632
|
+
:host {
|
|
633
|
+
grid-template-columns: 40px repeat(7, 1fr);
|
|
634
|
+
overflow-x: hidden;
|
|
635
|
+
}
|
|
636
|
+
.slot-cell {
|
|
637
|
+
font-size: 0.65rem;
|
|
638
|
+
}
|
|
639
|
+
.slot-cell.blocked, .slot-cell.selected {
|
|
640
|
+
font-size: 0;
|
|
641
|
+
padding: 0;
|
|
642
|
+
}
|
|
643
|
+
.time-slot-label {
|
|
644
|
+
font-size: 0.65rem;
|
|
645
|
+
}
|
|
646
|
+
.header-cell {
|
|
647
|
+
font-size: 0.7rem;
|
|
648
|
+
}
|
|
649
|
+
.header-cell .day-num {
|
|
650
|
+
font-size: 0.8rem;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
.time-col { background-color: var(--glatam-surface); display: flex; flex-direction: column; }
|
|
654
|
+
.day-col { background-color: var(--glatam-bg); display: flex; flex-direction: column; }
|
|
655
|
+
.header-cell {
|
|
656
|
+
height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
657
|
+
background-color: var(--glatam-surface); border-bottom: 2px solid var(--glatam-border);
|
|
658
|
+
font-size: 0.8rem; font-weight: 500; text-transform: capitalize;
|
|
659
|
+
}
|
|
660
|
+
.header-cell.today { color: var(--glatam-primary); font-weight: 700; }
|
|
661
|
+
.header-cell .day-num { font-size: 0.95rem; font-weight: 600; margin-top: 2px; }
|
|
662
|
+
.slot-cell {
|
|
663
|
+
height: var(--glatam-slot-height); border-bottom: 1px solid var(--glatam-border);
|
|
664
|
+
display: flex; align-items: center; justify-content: center; font-size: 0.75rem;
|
|
665
|
+
cursor: pointer; transition: background-color var(--glatam-transition-fast); position: relative;
|
|
666
|
+
}
|
|
667
|
+
.time-slot-label { font-size: 0.7rem; color: var(--glatam-text-secondary); }
|
|
668
|
+
.slot-cell.available:hover { background-color: var(--glatam-surface); }
|
|
669
|
+
.slot-cell.blocked {
|
|
670
|
+
background-color: var(--glatam-blocked-bg);
|
|
671
|
+
background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, var(--glatam-blocked-stripe) 5px, var(--glatam-blocked-stripe) 10px);
|
|
672
|
+
color: var(--glatam-blocked-text); cursor: not-allowed; font-weight: 600; padding: 0 4px;
|
|
673
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
|
|
674
|
+
}
|
|
675
|
+
.slot-cell.selected { background-color: var(--glatam-selection-bg); border-left: 3px solid var(--glatam-selection-border); }
|
|
676
|
+
.slot-cell.drag-selecting { background-color: var(--glatam-primary-light); }
|
|
677
|
+
`;
|
|
678
|
+
R([
|
|
679
|
+
s({ type: Array })
|
|
680
|
+
], w.prototype, "days", 2);
|
|
681
|
+
R([
|
|
682
|
+
s({ type: Array })
|
|
683
|
+
], w.prototype, "slots", 2);
|
|
684
|
+
R([
|
|
685
|
+
s({ type: String })
|
|
686
|
+
], w.prototype, "locale", 2);
|
|
687
|
+
R([
|
|
688
|
+
s({ type: Object })
|
|
689
|
+
], w.prototype, "selectedRange", 2);
|
|
690
|
+
R([
|
|
691
|
+
s({ type: String })
|
|
692
|
+
], w.prototype, "role", 2);
|
|
693
|
+
R([
|
|
694
|
+
u()
|
|
695
|
+
], w.prototype, "isDragging", 2);
|
|
696
|
+
R([
|
|
697
|
+
u()
|
|
698
|
+
], w.prototype, "dragDayIndex", 2);
|
|
699
|
+
R([
|
|
700
|
+
u()
|
|
701
|
+
], w.prototype, "dragStartSlotIndex", 2);
|
|
702
|
+
R([
|
|
703
|
+
u()
|
|
704
|
+
], w.prototype, "dragEndSlotIndex", 2);
|
|
705
|
+
w = R([
|
|
706
|
+
T("glatam-calendar-week-view")
|
|
707
|
+
], w);
|
|
708
|
+
var G = Object.defineProperty, V = Object.getOwnPropertyDescriptor, z = (e, t, a, i) => {
|
|
709
|
+
for (var r = i > 1 ? void 0 : i ? V(t, a) : t, l = e.length - 1, o; l >= 0; l--)
|
|
710
|
+
(o = e[l]) && (r = (i ? o(t, a, r) : o(r)) || r);
|
|
711
|
+
return i && r && G(t, a, r), r;
|
|
712
|
+
};
|
|
713
|
+
let S = class extends O {
|
|
714
|
+
constructor() {
|
|
715
|
+
super(...arguments), this.day = null, this.slots = [], this.locale = "es", this.selectedRange = null, this.role = "provider", this.isDragging = !1, this.dragStartSlotIndex = null, this.dragEndSlotIndex = null, this.handleMouseUp = () => {
|
|
716
|
+
if (!this.isDragging || !this.day || this.dragStartSlotIndex === null || this.dragEndSlotIndex === null) {
|
|
717
|
+
this.isDragging = !1;
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
this.isDragging = !1;
|
|
721
|
+
const e = Math.min(this.dragStartSlotIndex, this.dragEndSlotIndex), t = Math.max(this.dragStartSlotIndex, this.dragEndSlotIndex), a = this.day.slots.slice(e, t + 1);
|
|
722
|
+
a.some((i) => i.isBlocked) || this.dispatchEvent(new CustomEvent("range-select", {
|
|
723
|
+
detail: { dateString: this.day.dateString, start: a[0].start, end: a[a.length - 1].end },
|
|
724
|
+
bubbles: !0,
|
|
725
|
+
composed: !0
|
|
726
|
+
})), this.dragStartSlotIndex = null, this.dragEndSlotIndex = null;
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
connectedCallback() {
|
|
730
|
+
super.connectedCallback(), window.addEventListener("mouseup", this.handleMouseUp);
|
|
731
|
+
}
|
|
732
|
+
disconnectedCallback() {
|
|
733
|
+
window.removeEventListener("mouseup", this.handleMouseUp), super.disconnectedCallback();
|
|
734
|
+
}
|
|
735
|
+
handleMouseDown(e, t) {
|
|
736
|
+
if (t && this.day) {
|
|
737
|
+
if (this.role === "buyer") return;
|
|
738
|
+
this.dispatchEvent(new CustomEvent("slot-click", {
|
|
739
|
+
detail: { dateString: this.day.dateString, slot: this.day.slots[e], isBlocked: !0 },
|
|
740
|
+
bubbles: !0,
|
|
741
|
+
composed: !0
|
|
742
|
+
}));
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
this.isDragging = !0, this.dragStartSlotIndex = e, this.dragEndSlotIndex = e;
|
|
746
|
+
}
|
|
747
|
+
handleMouseEnter(e, t) {
|
|
748
|
+
this.isDragging && !t && (this.dragEndSlotIndex = e);
|
|
749
|
+
}
|
|
750
|
+
isSlotSelected(e) {
|
|
751
|
+
return !this.day || !this.selectedRange || this.selectedRange.dateString !== this.day.dateString ? !1 : e.start >= this.selectedRange.start && e.end <= this.selectedRange.end;
|
|
752
|
+
}
|
|
753
|
+
isSlotDragSelecting(e) {
|
|
754
|
+
if (!this.isDragging) return !1;
|
|
755
|
+
const t = Math.min(this.dragStartSlotIndex, this.dragEndSlotIndex), a = Math.max(this.dragStartSlotIndex, this.dragEndSlotIndex);
|
|
756
|
+
return e >= t && e <= a;
|
|
757
|
+
}
|
|
758
|
+
render() {
|
|
759
|
+
if (!this.day) return d`<div>Cargando...</div>`;
|
|
760
|
+
const e = this.day.dateString === (/* @__PURE__ */ new Date()).toISOString().split("T")[0], t = new Intl.DateTimeFormat(this.locale, { weekday: "long", day: "numeric", month: "long" }).format(this.day.date);
|
|
761
|
+
return d`
|
|
762
|
+
<div class="time-col">
|
|
763
|
+
<div class="header-cell">Hora</div>
|
|
764
|
+
${this.slots.map((a) => d`<div class="slot-cell time-slot-label">${a.start}</div>`)}
|
|
765
|
+
</div>
|
|
766
|
+
|
|
767
|
+
<div class="day-col">
|
|
768
|
+
<div class="header-cell ${e ? "today" : ""}">
|
|
769
|
+
<div style="text-transform: capitalize;">${t}</div>
|
|
770
|
+
</div>
|
|
771
|
+
|
|
772
|
+
${this.day.slots.map((a, i) => {
|
|
773
|
+
var p, n;
|
|
774
|
+
const r = a.isBlocked, l = this.isSlotSelected(a), o = this.isSlotDragSelecting(i);
|
|
775
|
+
return d`
|
|
776
|
+
<div
|
|
777
|
+
class=${N({
|
|
778
|
+
"slot-cell": !0,
|
|
779
|
+
available: !r,
|
|
780
|
+
blocked: r,
|
|
781
|
+
selected: l,
|
|
782
|
+
"drag-selecting": o
|
|
783
|
+
})}
|
|
784
|
+
@mousedown=${() => this.handleMouseDown(i, r)}
|
|
785
|
+
@mouseenter=${() => this.handleMouseEnter(i, r)}
|
|
786
|
+
title=${r && ((p = a.rule) != null && p.description) ? a.rule.description : ""}
|
|
787
|
+
>
|
|
788
|
+
${r ? ((n = a.rule) == null ? void 0 : n.description) || "Ocupado" : l ? "Reservado" : ""}
|
|
789
|
+
</div>
|
|
790
|
+
`;
|
|
791
|
+
})}
|
|
792
|
+
</div>
|
|
793
|
+
`;
|
|
794
|
+
}
|
|
795
|
+
};
|
|
796
|
+
S.styles = E`
|
|
797
|
+
:host {
|
|
798
|
+
display: grid; grid-template-columns: var(--glatam-time-col-width) 1fr; gap: 2px;
|
|
799
|
+
width: 100%; background-color: var(--glatam-border); border: 1px solid var(--glatam-border);
|
|
800
|
+
border-radius: var(--glatam-grid-border-radius); overflow: hidden; user-select: none;
|
|
801
|
+
}
|
|
802
|
+
.time-col { background-color: var(--glatam-surface); display: flex; flex-direction: column; }
|
|
803
|
+
.day-col { background-color: var(--glatam-bg); display: flex; flex-direction: column; }
|
|
804
|
+
.header-cell {
|
|
805
|
+
height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
806
|
+
background-color: var(--glatam-surface); border-bottom: 2px solid var(--glatam-border);
|
|
807
|
+
font-size: 0.875rem; font-weight: 500;
|
|
808
|
+
}
|
|
809
|
+
.header-cell.today { color: var(--glatam-primary); font-weight: 700; }
|
|
810
|
+
.slot-cell {
|
|
811
|
+
height: var(--glatam-slot-height); border-bottom: 1px solid var(--glatam-border);
|
|
812
|
+
display: flex; align-items: center; justify-content: center; font-size: 0.75rem;
|
|
813
|
+
cursor: pointer; transition: background-color var(--glatam-transition-fast); position: relative;
|
|
814
|
+
}
|
|
815
|
+
.time-slot-label { font-size: 0.7rem; color: var(--glatam-text-secondary); }
|
|
816
|
+
.slot-cell.available:hover { background-color: var(--glatam-surface); }
|
|
817
|
+
.slot-cell.blocked {
|
|
818
|
+
background-color: var(--glatam-blocked-bg);
|
|
819
|
+
background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, var(--glatam-blocked-stripe) 5px, var(--glatam-blocked-stripe) 10px);
|
|
820
|
+
color: var(--glatam-blocked-text); cursor: not-allowed; font-weight: 600; padding: 0 10px;
|
|
821
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
822
|
+
}
|
|
823
|
+
.slot-cell.selected { background-color: var(--glatam-selection-bg); border-left: 3px solid var(--glatam-selection-border); }
|
|
824
|
+
.slot-cell.drag-selecting { background-color: var(--glatam-primary-light); }
|
|
825
|
+
`;
|
|
826
|
+
z([
|
|
827
|
+
s({ type: Object })
|
|
828
|
+
], S.prototype, "day", 2);
|
|
829
|
+
z([
|
|
830
|
+
s({ type: Array })
|
|
831
|
+
], S.prototype, "slots", 2);
|
|
832
|
+
z([
|
|
833
|
+
s({ type: String })
|
|
834
|
+
], S.prototype, "locale", 2);
|
|
835
|
+
z([
|
|
836
|
+
s({ type: Object })
|
|
837
|
+
], S.prototype, "selectedRange", 2);
|
|
838
|
+
z([
|
|
839
|
+
s({ type: String })
|
|
840
|
+
], S.prototype, "role", 2);
|
|
841
|
+
z([
|
|
842
|
+
u()
|
|
843
|
+
], S.prototype, "isDragging", 2);
|
|
844
|
+
z([
|
|
845
|
+
u()
|
|
846
|
+
], S.prototype, "dragStartSlotIndex", 2);
|
|
847
|
+
z([
|
|
848
|
+
u()
|
|
849
|
+
], S.prototype, "dragEndSlotIndex", 2);
|
|
850
|
+
S = z([
|
|
851
|
+
T("glatam-calendar-day-view")
|
|
852
|
+
], S);
|
|
853
|
+
const Y = E`
|
|
854
|
+
dialog {
|
|
855
|
+
background: transparent;
|
|
856
|
+
border: none;
|
|
857
|
+
padding: 0;
|
|
858
|
+
overflow: visible;
|
|
859
|
+
outline: none;
|
|
860
|
+
max-width: 100vw;
|
|
861
|
+
max-height: 100vh;
|
|
862
|
+
}
|
|
863
|
+
dialog::backdrop {
|
|
864
|
+
background: rgba(0, 0, 0, 0.35);
|
|
865
|
+
backdrop-filter: blur(10px);
|
|
866
|
+
-webkit-backdrop-filter: blur(10px);
|
|
867
|
+
}
|
|
868
|
+
.modal-content {
|
|
869
|
+
background: var(--glatam-bg);
|
|
870
|
+
color: var(--glatam-text);
|
|
871
|
+
border-radius: 24px;
|
|
872
|
+
padding: 28px;
|
|
873
|
+
width: 90vw;
|
|
874
|
+
max-width: 400px;
|
|
875
|
+
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
|
|
876
|
+
border: 1px solid var(--glatam-border);
|
|
877
|
+
display: flex;
|
|
878
|
+
flex-direction: column;
|
|
879
|
+
gap: 18px;
|
|
880
|
+
box-sizing: border-box;
|
|
881
|
+
animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
882
|
+
}
|
|
883
|
+
@keyframes zoomIn {
|
|
884
|
+
from {
|
|
885
|
+
transform: scale(0.92) translateY(10px);
|
|
886
|
+
opacity: 0;
|
|
887
|
+
}
|
|
888
|
+
to {
|
|
889
|
+
transform: scale(1) translateY(0);
|
|
890
|
+
opacity: 1;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
h3 { margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
|
|
894
|
+
.form-group { display: flex; flex-direction: column; gap: 6px; }
|
|
895
|
+
label { font-size: 0.8rem; color: var(--glatam-text-secondary); font-weight: 600; }
|
|
896
|
+
input[type="text"] {
|
|
897
|
+
background: var(--glatam-surface);
|
|
898
|
+
border: 1px solid var(--glatam-border);
|
|
899
|
+
border-radius: 10px;
|
|
900
|
+
padding: 10px 14px;
|
|
901
|
+
color: var(--glatam-text);
|
|
902
|
+
font-family: inherit;
|
|
903
|
+
font-size: 0.9rem;
|
|
904
|
+
outline: none;
|
|
905
|
+
transition: border-color var(--glatam-transition-fast);
|
|
906
|
+
}
|
|
907
|
+
input[type="text"]:focus {
|
|
908
|
+
border-color: var(--glatam-primary);
|
|
909
|
+
}
|
|
910
|
+
.switch-row {
|
|
911
|
+
display: flex;
|
|
912
|
+
justify-content: space-between;
|
|
913
|
+
align-items: center;
|
|
914
|
+
padding: 4px 0;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
/* Apple Switch Style */
|
|
918
|
+
.switch {
|
|
919
|
+
position: relative;
|
|
920
|
+
display: inline-block;
|
|
921
|
+
width: 46px;
|
|
922
|
+
height: 26px;
|
|
923
|
+
}
|
|
924
|
+
.switch input { opacity: 0; width: 0; height: 0; }
|
|
925
|
+
.slider {
|
|
926
|
+
position: absolute;
|
|
927
|
+
cursor: pointer;
|
|
928
|
+
top: 0; left: 0; right: 0; bottom: 0;
|
|
929
|
+
background-color: var(--glatam-border);
|
|
930
|
+
transition: .25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
931
|
+
border-radius: 26px;
|
|
932
|
+
}
|
|
933
|
+
.slider:before {
|
|
934
|
+
position: absolute;
|
|
935
|
+
content: "";
|
|
936
|
+
height: 20px;
|
|
937
|
+
width: 20px;
|
|
938
|
+
left: 3px;
|
|
939
|
+
bottom: 3px;
|
|
940
|
+
background-color: white;
|
|
941
|
+
transition: .25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
942
|
+
border-radius: 50%;
|
|
943
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
|
944
|
+
}
|
|
945
|
+
input:checked + .slider {
|
|
946
|
+
background-color: var(--glatam-primary);
|
|
947
|
+
}
|
|
948
|
+
input:checked + .slider:before {
|
|
949
|
+
transform: translateX(20px);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.days-grid {
|
|
953
|
+
display: grid;
|
|
954
|
+
grid-template-columns: repeat(7, 1fr);
|
|
955
|
+
gap: 6px;
|
|
956
|
+
margin-top: 4px;
|
|
957
|
+
}
|
|
958
|
+
.day-btn {
|
|
959
|
+
width: 36px;
|
|
960
|
+
height: 36px;
|
|
961
|
+
margin: 0 auto;
|
|
962
|
+
border-radius: 50%;
|
|
963
|
+
border: 1px solid var(--glatam-border);
|
|
964
|
+
background: var(--glatam-bg);
|
|
965
|
+
color: var(--glatam-text);
|
|
966
|
+
font-size: 0.8rem;
|
|
967
|
+
font-weight: 600;
|
|
968
|
+
cursor: pointer;
|
|
969
|
+
display: flex;
|
|
970
|
+
align-items: center;
|
|
971
|
+
justify-content: center;
|
|
972
|
+
transition: background-color var(--glatam-transition-fast), color var(--glatam-transition-fast), border-color var(--glatam-transition-fast);
|
|
973
|
+
}
|
|
974
|
+
.day-btn:hover {
|
|
975
|
+
background-color: var(--glatam-surface);
|
|
976
|
+
}
|
|
977
|
+
.day-btn.selected {
|
|
978
|
+
background: var(--glatam-primary);
|
|
979
|
+
color: var(--glatam-text-light);
|
|
980
|
+
border-color: var(--glatam-primary);
|
|
981
|
+
}
|
|
982
|
+
.btn-actions { display: flex; gap: 10px; margin-top: 10px; justify-content: flex-end; }
|
|
983
|
+
.btn {
|
|
984
|
+
padding: 10px 18px;
|
|
985
|
+
border-radius: 20px;
|
|
986
|
+
font-size: 0.875rem;
|
|
987
|
+
font-weight: 600;
|
|
988
|
+
cursor: pointer;
|
|
989
|
+
border: none;
|
|
990
|
+
transition: opacity var(--glatam-transition-fast), transform var(--glatam-transition-fast);
|
|
991
|
+
display: inline-flex;
|
|
992
|
+
align-items: center;
|
|
993
|
+
justify-content: center;
|
|
994
|
+
}
|
|
995
|
+
.btn:active { transform: scale(0.97); }
|
|
996
|
+
.btn-cancel { background: transparent; color: var(--glatam-text); border: 1px solid var(--glatam-border); }
|
|
997
|
+
.btn-cancel:hover { background-color: var(--glatam-surface); }
|
|
998
|
+
.btn-save { background: var(--glatam-primary); color: var(--glatam-text-light); }
|
|
999
|
+
.btn-save:hover { opacity: 0.95; }
|
|
1000
|
+
.btn-danger {
|
|
1001
|
+
background: rgba(255, 69, 58, 0.12);
|
|
1002
|
+
color: #ff453a;
|
|
1003
|
+
margin-right: auto;
|
|
1004
|
+
}
|
|
1005
|
+
.btn-danger:hover {
|
|
1006
|
+
background: rgba(255, 69, 58, 0.18);
|
|
1007
|
+
}
|
|
1008
|
+
`;
|
|
1009
|
+
var Z = Object.defineProperty, J = Object.getOwnPropertyDescriptor, k = (e, t, a, i) => {
|
|
1010
|
+
for (var r = i > 1 ? void 0 : i ? J(t, a) : t, l = e.length - 1, o; l >= 0; l--)
|
|
1011
|
+
(o = e[l]) && (r = (i ? o(t, a, r) : o(r)) || r);
|
|
1012
|
+
return i && r && Z(t, a, r), r;
|
|
1013
|
+
};
|
|
1014
|
+
let x = class extends O {
|
|
1015
|
+
constructor() {
|
|
1016
|
+
super(...arguments), this.open = !1, this.dateString = "", this.startTime = "", this.endTime = "", this.isRange = !1, this.existingRule = null, this.description = "", this.blockAllDay = !0, this.isRecurring = !1, this.selectedDays = [];
|
|
1017
|
+
}
|
|
1018
|
+
willUpdate(e) {
|
|
1019
|
+
e.has("open") && this.open && (this.existingRule ? (this.description = "Bloqueo", this.blockAllDay = !this.existingRule.slots || this.existingRule.slots.length === 0, this.isRecurring = this.existingRule.type === "weekly", this.selectedDays = this.existingRule.daysOfWeek || []) : (this.description = "", this.blockAllDay = !this.isRange, this.isRecurring = !1, this.selectedDays = [(/* @__PURE__ */ new Date(this.dateString + "T00:00:00")).getDay()]));
|
|
1020
|
+
}
|
|
1021
|
+
updated(e) {
|
|
1022
|
+
var t;
|
|
1023
|
+
if (e.has("open")) {
|
|
1024
|
+
const a = (t = this.shadowRoot) == null ? void 0 : t.getElementById("booking-dialog");
|
|
1025
|
+
a && (this.open ? a.open || a.showModal() : a.open && a.close());
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
handleDialogClose() {
|
|
1029
|
+
this.open && this.dispatchEvent(new CustomEvent("close", { bubbles: !0, composed: !0 }));
|
|
1030
|
+
}
|
|
1031
|
+
toggleDay(e) {
|
|
1032
|
+
const t = this.selectedDays.indexOf(e);
|
|
1033
|
+
this.selectedDays = t > -1 ? this.selectedDays.filter((a) => a !== e) : [...this.selectedDays, e];
|
|
1034
|
+
}
|
|
1035
|
+
handleSave() {
|
|
1036
|
+
const e = {
|
|
1037
|
+
title: this.description || "Bloqueo",
|
|
1038
|
+
blockAllDay: this.blockAllDay,
|
|
1039
|
+
isRecurring: this.isRecurring,
|
|
1040
|
+
selectedDays: this.selectedDays,
|
|
1041
|
+
dateString: this.dateString,
|
|
1042
|
+
startTime: this.startTime,
|
|
1043
|
+
endTime: this.endTime
|
|
1044
|
+
};
|
|
1045
|
+
this.dispatchEvent(new CustomEvent("save-rule", { detail: e, bubbles: !0, composed: !0 }));
|
|
1046
|
+
}
|
|
1047
|
+
handleDelete() {
|
|
1048
|
+
this.existingRule && this.dispatchEvent(new CustomEvent("delete-rule", {
|
|
1049
|
+
detail: { id: this.existingRule.id },
|
|
1050
|
+
bubbles: !0,
|
|
1051
|
+
composed: !0
|
|
1052
|
+
}));
|
|
1053
|
+
}
|
|
1054
|
+
render() {
|
|
1055
|
+
const e = ["D", "L", "M", "M", "J", "V", "S"], t = this.isRange ? `${this.dateString} (${this.startTime} - ${this.endTime})` : this.dateString;
|
|
1056
|
+
return d`
|
|
1057
|
+
<dialog id="booking-dialog" @close=${this.handleDialogClose}>
|
|
1058
|
+
<div class="modal-content">
|
|
1059
|
+
<h3>${this.existingRule ? "Gestionar Bloqueo" : "Crear Bloqueo"}</h3>
|
|
1060
|
+
|
|
1061
|
+
<div style="font-size: 0.85rem; color: var(--glatam-text-secondary);">
|
|
1062
|
+
Selección: <strong>${t}</strong>
|
|
1063
|
+
</div>
|
|
1064
|
+
|
|
1065
|
+
<div class="form-group">
|
|
1066
|
+
<label>Descripción / Nota</label>
|
|
1067
|
+
<input
|
|
1068
|
+
type="text"
|
|
1069
|
+
.value=${this.description}
|
|
1070
|
+
@input=${(a) => this.description = a.target.value}
|
|
1071
|
+
placeholder="Ej. Reunión de equipo, Vacaciones"
|
|
1072
|
+
/>
|
|
1073
|
+
</div>
|
|
1074
|
+
|
|
1075
|
+
<div class="switch-row">
|
|
1076
|
+
<label>Bloquear todo el día</label>
|
|
1077
|
+
<label class="switch">
|
|
1078
|
+
<input
|
|
1079
|
+
type="checkbox"
|
|
1080
|
+
.checked=${this.blockAllDay}
|
|
1081
|
+
@change=${(a) => this.blockAllDay = a.target.checked}
|
|
1082
|
+
/>
|
|
1083
|
+
<span class="slider"></span>
|
|
1084
|
+
</label>
|
|
1085
|
+
</div>
|
|
1086
|
+
|
|
1087
|
+
<div class="switch-row">
|
|
1088
|
+
<label>Repetir semanalmente</label>
|
|
1089
|
+
<label class="switch">
|
|
1090
|
+
<input
|
|
1091
|
+
type="checkbox"
|
|
1092
|
+
.checked=${this.isRecurring}
|
|
1093
|
+
@change=${(a) => this.isRecurring = a.target.checked}
|
|
1094
|
+
/>
|
|
1095
|
+
<span class="slider"></span>
|
|
1096
|
+
</label>
|
|
1097
|
+
</div>
|
|
1098
|
+
|
|
1099
|
+
${this.isRecurring ? d`
|
|
1100
|
+
<div class="form-group">
|
|
1101
|
+
<label>Repetir los días</label>
|
|
1102
|
+
<div class="days-grid">
|
|
1103
|
+
${[1, 2, 3, 4, 5, 6, 0].map((a) => d`
|
|
1104
|
+
<button
|
|
1105
|
+
class="day-btn ${this.selectedDays.includes(a) ? "selected" : ""}"
|
|
1106
|
+
@click=${() => this.toggleDay(a)}
|
|
1107
|
+
>
|
|
1108
|
+
${e[a]}
|
|
1109
|
+
</button>
|
|
1110
|
+
`)}
|
|
1111
|
+
</div>
|
|
1112
|
+
</div>
|
|
1113
|
+
` : ""}
|
|
1114
|
+
|
|
1115
|
+
<div class="btn-actions">
|
|
1116
|
+
${this.existingRule ? d`<button class="btn btn-danger" @click=${this.handleDelete}>Eliminar</button>` : ""}
|
|
1117
|
+
<button class="btn btn-cancel" @click=${() => this.dispatchEvent(new CustomEvent("close"))}>Cancelar</button>
|
|
1118
|
+
<button class="btn btn-save" @click=${this.handleSave}>Guardar</button>
|
|
1119
|
+
</div>
|
|
1120
|
+
</div>
|
|
1121
|
+
</dialog>
|
|
1122
|
+
`;
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
x.styles = Y;
|
|
1126
|
+
k([
|
|
1127
|
+
s({ type: Boolean })
|
|
1128
|
+
], x.prototype, "open", 2);
|
|
1129
|
+
k([
|
|
1130
|
+
s({ type: String })
|
|
1131
|
+
], x.prototype, "dateString", 2);
|
|
1132
|
+
k([
|
|
1133
|
+
s({ type: String })
|
|
1134
|
+
], x.prototype, "startTime", 2);
|
|
1135
|
+
k([
|
|
1136
|
+
s({ type: String })
|
|
1137
|
+
], x.prototype, "endTime", 2);
|
|
1138
|
+
k([
|
|
1139
|
+
s({ type: Boolean })
|
|
1140
|
+
], x.prototype, "isRange", 2);
|
|
1141
|
+
k([
|
|
1142
|
+
s({ type: Object })
|
|
1143
|
+
], x.prototype, "existingRule", 2);
|
|
1144
|
+
k([
|
|
1145
|
+
u()
|
|
1146
|
+
], x.prototype, "description", 2);
|
|
1147
|
+
k([
|
|
1148
|
+
u()
|
|
1149
|
+
], x.prototype, "blockAllDay", 2);
|
|
1150
|
+
k([
|
|
1151
|
+
u()
|
|
1152
|
+
], x.prototype, "isRecurring", 2);
|
|
1153
|
+
k([
|
|
1154
|
+
u()
|
|
1155
|
+
], x.prototype, "selectedDays", 2);
|
|
1156
|
+
x = k([
|
|
1157
|
+
T("glatam-calendar-modal")
|
|
1158
|
+
], x);
|
|
1159
|
+
var X = Object.defineProperty, K = Object.getOwnPropertyDescriptor, h = (e, t, a, i) => {
|
|
1160
|
+
for (var r = i > 1 ? void 0 : i ? K(t, a) : t, l = e.length - 1, o; l >= 0; l--)
|
|
1161
|
+
(o = e[l]) && (r = (i ? o(t, a, r) : o(r)) || r);
|
|
1162
|
+
return i && r && X(t, a, r), r;
|
|
1163
|
+
};
|
|
1164
|
+
const Q = [
|
|
1165
|
+
{ start: "09:00", end: "10:00" },
|
|
1166
|
+
{ start: "10:00", end: "11:00" },
|
|
1167
|
+
{ start: "11:00", end: "12:00" },
|
|
1168
|
+
{ start: "12:00", end: "13:00" },
|
|
1169
|
+
{ start: "13:00", end: "14:00" },
|
|
1170
|
+
{ start: "14:00", end: "15:00" },
|
|
1171
|
+
{ start: "15:00", end: "16:00" },
|
|
1172
|
+
{ start: "16:00", end: "17:00" },
|
|
1173
|
+
{ start: "17:00", end: "18:00" }
|
|
1174
|
+
];
|
|
1175
|
+
let g = class extends O {
|
|
1176
|
+
constructor() {
|
|
1177
|
+
super(...arguments), this.role = "provider", this.size = "medium", this.view = "month", this.locale = "es", this.startOfWeekDay = 0, this.rules = [], this.selectedDates = [], this.selectedRange = null, this.hostTimezone = "America/Bogota", this.activeTimezone = "local", this.slots = Q, this.minDate = "", this.maxDate = "", this.showNeighboringMonth = !0, this.tileClassName = null, this.activeDate = /* @__PURE__ */ new Date(), this.localRules = [], this.darkMode = !1, this.modalOpen = !1, this.modalDateString = "", this.modalStartTime = "", this.modalEndTime = "", this.modalIsRange = !1, this.modalExistingRule = null;
|
|
1178
|
+
}
|
|
1179
|
+
firstUpdated() {
|
|
1180
|
+
this.darkMode = window.matchMedia("(prefers-color-scheme: dark)").matches, this.localRules = [...this.rules];
|
|
1181
|
+
}
|
|
1182
|
+
willUpdate(e) {
|
|
1183
|
+
e.has("rules") && (this.localRules = [...this.rules || []]);
|
|
1184
|
+
}
|
|
1185
|
+
updated(e) {
|
|
1186
|
+
e.has("darkMode") && this.classList.toggle("dark-mode", this.darkMode);
|
|
1187
|
+
}
|
|
1188
|
+
handlePrev() {
|
|
1189
|
+
const e = new Date(this.activeDate);
|
|
1190
|
+
this.view === "month" ? e.setMonth(e.getMonth() - 1) : this.view === "week" ? e.setDate(e.getDate() - 7) : e.setDate(e.getDate() - 1), this.activeDate = e;
|
|
1191
|
+
}
|
|
1192
|
+
handleNext() {
|
|
1193
|
+
const e = new Date(this.activeDate);
|
|
1194
|
+
this.view === "month" ? e.setMonth(e.getMonth() + 1) : this.view === "week" ? e.setDate(e.getDate() + 7) : e.setDate(e.getDate() + 1), this.activeDate = e;
|
|
1195
|
+
}
|
|
1196
|
+
getHeaderTitle() {
|
|
1197
|
+
const e = this.view === "month" ? { month: "long", year: "numeric" } : this.view === "week" ? { month: "short", year: "numeric" } : { day: "numeric", month: "long", year: "numeric" };
|
|
1198
|
+
return new Intl.DateTimeFormat(this.locale, e).format(this.activeDate);
|
|
1199
|
+
}
|
|
1200
|
+
handleDaySelect(e) {
|
|
1201
|
+
const { dateString: t, isBlocked: a } = e.detail;
|
|
1202
|
+
this.role === "buyer" && a || (this.activeDate = /* @__PURE__ */ new Date(t + "T00:00:00"), this.view = "day", this.dispatchEvent(new CustomEvent("date-selected", { detail: { dateString: t }, bubbles: !0, composed: !0 })));
|
|
1203
|
+
}
|
|
1204
|
+
handleRangeSelect(e) {
|
|
1205
|
+
var $, M;
|
|
1206
|
+
const { dateString: t, start: a, end: i } = e.detail, r = this.activeTimezone === "local" ? C(this.activeDate, this.hostTimezone, "local") : 0, l = (/* @__PURE__ */ new Date()).toISOString().split("T")[0], o = this.minDate || (this.role === "buyer" ? l : "");
|
|
1207
|
+
if (this.role === "buyer" && o && t < o) return;
|
|
1208
|
+
const p = this.getDisplaySlots(r), n = p.findIndex((B) => B.start === a), c = p.findIndex((B) => B.end === i), m = (($ = this.slots[n]) == null ? void 0 : $.start) || a, y = ((M = this.slots[c]) == null ? void 0 : M.end) || i;
|
|
1209
|
+
if (this.role === "buyer") {
|
|
1210
|
+
this.selectedRange = { dateString: t, start: a, end: i }, this.dispatchEvent(new CustomEvent("booking-selected", { detail: { dateString: t, start: a, end: i, hostStart: m, hostEnd: y }, bubbles: !0, composed: !0 }));
|
|
1211
|
+
return;
|
|
1212
|
+
}
|
|
1213
|
+
this.openModal(t, m, y, !0, null);
|
|
1214
|
+
}
|
|
1215
|
+
handleSlotClick(e) {
|
|
1216
|
+
const { dateString: t, slot: a } = e.detail, i = /* @__PURE__ */ new Date(t + "T00:00:00"), r = this.activeTimezone === "local" ? C(this.activeDate, this.hostTimezone, "local") : 0, l = (/* @__PURE__ */ new Date()).toISOString().split("T")[0], o = this.minDate || (this.role === "buyer" ? l : "");
|
|
1217
|
+
if (this.role === "buyer" && (a.isBlocked || o && t < o)) return;
|
|
1218
|
+
const p = this.getDisplaySlots(r), n = p.findIndex((y) => y.start === a.start), c = this.slots[n] || a;
|
|
1219
|
+
if (this.role === "buyer") {
|
|
1220
|
+
this.selectedRange = { dateString: t, start: a.start, end: a.end }, this.dispatchEvent(new CustomEvent("booking-selected", { detail: { dateString: t, start: a.start, end: a.end, hostStart: c.start, hostEnd: c.end }, bubbles: !0, composed: !0 }));
|
|
1221
|
+
return;
|
|
1222
|
+
}
|
|
1223
|
+
const m = this.localRules.find((y) => I(i, c, [y]));
|
|
1224
|
+
this.openModal(t, c.start, c.end, !0, m || null);
|
|
1225
|
+
}
|
|
1226
|
+
handleBlockDayAction() {
|
|
1227
|
+
const e = _(this.activeDate), t = this.localRules.find((a) => I(this.activeDate, void 0, [a]));
|
|
1228
|
+
this.openModal(e, "", "", !1, t || null);
|
|
1229
|
+
}
|
|
1230
|
+
openModal(e, t, a, i, r) {
|
|
1231
|
+
this.modalDateString = e, this.modalStartTime = t, this.modalEndTime = a, this.modalIsRange = i, this.modalExistingRule = r, this.modalOpen = !0;
|
|
1232
|
+
}
|
|
1233
|
+
handleSaveRule(e) {
|
|
1234
|
+
const t = e.detail, a = this.modalExistingRule ? this.modalExistingRule.id : `rule-${Date.now()}`, i = {
|
|
1235
|
+
id: a,
|
|
1236
|
+
type: t.isRecurring ? "weekly" : "date-range",
|
|
1237
|
+
slots: t.blockAllDay ? void 0 : [{ start: t.startTime, end: t.endTime }],
|
|
1238
|
+
daysOfWeek: t.isRecurring ? t.selectedDays : void 0,
|
|
1239
|
+
startDate: t.isRecurring ? void 0 : t.dateString,
|
|
1240
|
+
endDate: t.isRecurring ? void 0 : t.dateString,
|
|
1241
|
+
description: t.title
|
|
1242
|
+
};
|
|
1243
|
+
this.localRules = this.modalExistingRule ? this.localRules.map((r) => r.id === a ? i : r) : [...this.localRules, i], this.modalOpen = !1, this.dispatchEvent(new CustomEvent("rules-changed", { detail: { rules: this.localRules }, bubbles: !0, composed: !0 }));
|
|
1244
|
+
}
|
|
1245
|
+
handleDeleteRule(e) {
|
|
1246
|
+
this.localRules = this.localRules.filter((t) => t.id !== e.detail.id), this.modalOpen = !1, this.dispatchEvent(new CustomEvent("rules-changed", { detail: { rules: this.localRules }, bubbles: !0, composed: !0 }));
|
|
1247
|
+
}
|
|
1248
|
+
getDisplaySlots(e) {
|
|
1249
|
+
return e === 0 ? this.slots : this.slots.map((t) => {
|
|
1250
|
+
const a = U(t, e), i = a.dayShift > 0 ? " (+1d)" : a.dayShift < 0 ? " (-1d)" : "";
|
|
1251
|
+
return { start: a.start + i, end: a.end + i };
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
render() {
|
|
1255
|
+
var p;
|
|
1256
|
+
const e = this.activeDate.getFullYear(), t = this.activeDate.getMonth(), a = I(this.activeDate, void 0, this.localRules), i = this.activeTimezone === "local" ? C(this.activeDate, this.hostTimezone, "local") : 0, r = this.getDisplaySlots(i), l = (n) => n.map((c) => ({ ...c, slots: c.slots.map((m, y) => {
|
|
1257
|
+
var $, M;
|
|
1258
|
+
return { ...m, start: (($ = r[y]) == null ? void 0 : $.start) || m.start, end: ((M = r[y]) == null ? void 0 : M.end) || m.end };
|
|
1259
|
+
}) })), o = ((p = this.hostTimezone.split("/").pop()) == null ? void 0 : p.replace("_", " ")) || "Anfitrión";
|
|
1260
|
+
return d`
|
|
1261
|
+
<div class="calendar-header">
|
|
1262
|
+
<div class="nav-group">
|
|
1263
|
+
<button class="btn" @click=${() => this.activeDate = /* @__PURE__ */ new Date()}>Hoy</button>
|
|
1264
|
+
<button class="btn" @click=${this.handlePrev}><</button>
|
|
1265
|
+
<button class="btn" @click=${this.handleNext}>></button>
|
|
1266
|
+
<span class="nav-title" style="text-transform: capitalize;">${this.getHeaderTitle()}</span>
|
|
1267
|
+
</div>
|
|
1268
|
+
|
|
1269
|
+
<div class="view-group">
|
|
1270
|
+
${this.role === "provider" ? d`
|
|
1271
|
+
<div class="timezone-badge">
|
|
1272
|
+
🌐 Zona:
|
|
1273
|
+
<select class="timezone-select" @change=${(n) => this.activeTimezone = n.target.value}>
|
|
1274
|
+
<option value="local" ?selected=${this.activeTimezone === "local"}>Mi Hora</option>
|
|
1275
|
+
<option value="host" ?selected=${this.activeTimezone === "host"}>Hora ${o}</option>
|
|
1276
|
+
</select>
|
|
1277
|
+
</div>
|
|
1278
|
+
` : ""}
|
|
1279
|
+
${this.role === "provider" && this.view === "day" ? d`<button class="btn btn-primary" @click=${this.handleBlockDayAction} style="margin-right: 8px;">${a ? "Liberar Día" : "Bloquear Día"}</button>` : ""}
|
|
1280
|
+
<button class="btn" @click=${() => this.darkMode = !this.darkMode} style="margin-right: 8px;">${this.darkMode ? "☀️" : "🌙"}</button>
|
|
1281
|
+
<div class="btn-group">
|
|
1282
|
+
<button class="btn ${this.view === "month" ? "active" : ""}" @click=${() => this.view = "month"}>Mes</button>
|
|
1283
|
+
<button class="btn ${this.view === "week" ? "active" : ""}" @click=${() => this.view = "week"}>Semana</button>
|
|
1284
|
+
<button class="btn ${this.view === "day" ? "active" : ""}" @click=${() => this.view = "day"}>Día</button>
|
|
1285
|
+
</div>
|
|
1286
|
+
</div>
|
|
1287
|
+
</div>
|
|
1288
|
+
|
|
1289
|
+
<div class="calendar-body">
|
|
1290
|
+
${this.view === "month" ? d`<glatam-calendar-month-view .days=${A(e, t, this.localRules, this.slots, this.startOfWeekDay)} .locale=${this.locale} .startOfWeekDay=${this.startOfWeekDay} .role=${this.role} .size=${this.size} .minDate=${this.minDate || (this.role === "buyer" ? (/* @__PURE__ */ new Date()).toISOString().split("T")[0] : "")} .maxDate=${this.maxDate} .showNeighboringMonth=${this.showNeighboringMonth} .tileClassName=${this.tileClassName} @day-select=${this.handleDaySelect}></glatam-calendar-month-view>` : this.view === "week" ? d`<glatam-calendar-week-view .days=${l(j(this.activeDate, this.localRules, this.slots, this.startOfWeekDay))} .slots=${r} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-week-view>` : d`<glatam-calendar-day-view .day=${l(j(this.activeDate, this.localRules, this.slots, this.startOfWeekDay)).find((n) => n.dateString === _(this.activeDate)) || null} .slots=${r} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-day-view>`}
|
|
1291
|
+
</div>
|
|
1292
|
+
|
|
1293
|
+
<glatam-calendar-modal
|
|
1294
|
+
.open=${this.modalOpen} .dateString=${this.modalDateString} .startTime=${this.modalStartTime} .endTime=${this.modalEndTime}
|
|
1295
|
+
.isRange=${this.modalIsRange} .existingRule=${this.modalExistingRule} @save-rule=${this.handleSaveRule}
|
|
1296
|
+
@delete-rule=${this.handleDeleteRule} @close=${() => this.modalOpen = !1}
|
|
1297
|
+
></glatam-calendar-modal>
|
|
1298
|
+
`;
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
g.styles = [P, W];
|
|
1302
|
+
h([
|
|
1303
|
+
s({ type: String })
|
|
1304
|
+
], g.prototype, "role", 2);
|
|
1305
|
+
h([
|
|
1306
|
+
s({ type: String, reflect: !0 })
|
|
1307
|
+
], g.prototype, "size", 2);
|
|
1308
|
+
h([
|
|
1309
|
+
s({ type: String })
|
|
1310
|
+
], g.prototype, "view", 2);
|
|
1311
|
+
h([
|
|
1312
|
+
s({ type: String })
|
|
1313
|
+
], g.prototype, "locale", 2);
|
|
1314
|
+
h([
|
|
1315
|
+
s({ type: Number })
|
|
1316
|
+
], g.prototype, "startOfWeekDay", 2);
|
|
1317
|
+
h([
|
|
1318
|
+
s({ type: Array })
|
|
1319
|
+
], g.prototype, "rules", 2);
|
|
1320
|
+
h([
|
|
1321
|
+
s({ type: Array })
|
|
1322
|
+
], g.prototype, "selectedDates", 2);
|
|
1323
|
+
h([
|
|
1324
|
+
s({ type: Object })
|
|
1325
|
+
], g.prototype, "selectedRange", 2);
|
|
1326
|
+
h([
|
|
1327
|
+
s({ type: String })
|
|
1328
|
+
], g.prototype, "hostTimezone", 2);
|
|
1329
|
+
h([
|
|
1330
|
+
s({ type: String })
|
|
1331
|
+
], g.prototype, "activeTimezone", 2);
|
|
1332
|
+
h([
|
|
1333
|
+
s({ type: Array })
|
|
1334
|
+
], g.prototype, "slots", 2);
|
|
1335
|
+
h([
|
|
1336
|
+
s({ type: String })
|
|
1337
|
+
], g.prototype, "minDate", 2);
|
|
1338
|
+
h([
|
|
1339
|
+
s({ type: String })
|
|
1340
|
+
], g.prototype, "maxDate", 2);
|
|
1341
|
+
h([
|
|
1342
|
+
s({ type: Boolean })
|
|
1343
|
+
], g.prototype, "showNeighboringMonth", 2);
|
|
1344
|
+
h([
|
|
1345
|
+
s({ attribute: !1 })
|
|
1346
|
+
], g.prototype, "tileClassName", 2);
|
|
1347
|
+
h([
|
|
1348
|
+
u()
|
|
1349
|
+
], g.prototype, "activeDate", 2);
|
|
1350
|
+
h([
|
|
1351
|
+
u()
|
|
1352
|
+
], g.prototype, "localRules", 2);
|
|
1353
|
+
h([
|
|
1354
|
+
u()
|
|
1355
|
+
], g.prototype, "darkMode", 2);
|
|
1356
|
+
h([
|
|
1357
|
+
u()
|
|
1358
|
+
], g.prototype, "modalOpen", 2);
|
|
1359
|
+
h([
|
|
1360
|
+
u()
|
|
1361
|
+
], g.prototype, "modalDateString", 2);
|
|
1362
|
+
h([
|
|
1363
|
+
u()
|
|
1364
|
+
], g.prototype, "modalStartTime", 2);
|
|
1365
|
+
h([
|
|
1366
|
+
u()
|
|
1367
|
+
], g.prototype, "modalEndTime", 2);
|
|
1368
|
+
h([
|
|
1369
|
+
u()
|
|
1370
|
+
], g.prototype, "modalIsRange", 2);
|
|
1371
|
+
h([
|
|
1372
|
+
u()
|
|
1373
|
+
], g.prototype, "modalExistingRule", 2);
|
|
1374
|
+
g = h([
|
|
1375
|
+
T("glatam-calendar")
|
|
1376
|
+
], g);
|
|
1377
|
+
var tt = Object.defineProperty, et = Object.getOwnPropertyDescriptor, v = (e, t, a, i) => {
|
|
1378
|
+
for (var r = i > 1 ? void 0 : i ? et(t, a) : t, l = e.length - 1, o; l >= 0; l--)
|
|
1379
|
+
(o = e[l]) && (r = (i ? o(t, a, r) : o(r)) || r);
|
|
1380
|
+
return i && r && tt(t, a, r), r;
|
|
1381
|
+
};
|
|
1382
|
+
let b = class extends O {
|
|
1383
|
+
constructor() {
|
|
1384
|
+
super(...arguments), this.role = "buyer", this.locale = "es", this.startOfWeekDay = 0, this.rules = [], this.selectedRange = null, this.size = "medium", this.hostTimezone = "America/Bogota", this.activeTimezone = "local", this.minDate = "", this.maxDate = "", this.showNeighboringMonth = !0, this.tileClassName = null, this.slots = [
|
|
1385
|
+
{ start: "09:00", end: "10:00" },
|
|
1386
|
+
{ start: "10:00", end: "11:00" },
|
|
1387
|
+
{ start: "11:00", end: "12:00" },
|
|
1388
|
+
{ start: "12:00", end: "13:00" },
|
|
1389
|
+
{ start: "13:00", end: "14:00" },
|
|
1390
|
+
{ start: "14:00", end: "15:00" },
|
|
1391
|
+
{ start: "15:00", end: "16:00" },
|
|
1392
|
+
{ start: "16:00", end: "17:00" },
|
|
1393
|
+
{ start: "17:00", end: "18:00" }
|
|
1394
|
+
], this.activeDate = /* @__PURE__ */ new Date(), this.dropdownOpen = !1, this.dropdownSelectedDateString = "";
|
|
1395
|
+
}
|
|
1396
|
+
handleDropdownDaySelect(e) {
|
|
1397
|
+
this.dropdownSelectedDateString = e.detail.dateString;
|
|
1398
|
+
}
|
|
1399
|
+
selectDropdownSlot(e) {
|
|
1400
|
+
const t = {
|
|
1401
|
+
dateString: this.dropdownSelectedDateString,
|
|
1402
|
+
start: e.displayStart,
|
|
1403
|
+
end: e.displayEnd,
|
|
1404
|
+
hostStart: e.start,
|
|
1405
|
+
hostEnd: e.end
|
|
1406
|
+
};
|
|
1407
|
+
this.selectedRange = { dateString: this.dropdownSelectedDateString, start: e.displayStart, end: e.displayEnd }, this.dispatchEvent(new CustomEvent("booking-selected", { detail: t, bubbles: !0, composed: !0 })), this.dropdownOpen = !1, this.dropdownSelectedDateString = "";
|
|
1408
|
+
}
|
|
1409
|
+
render() {
|
|
1410
|
+
const e = this.selectedRange ? `Reserva: ${this.selectedRange.dateString} (${this.selectedRange.start} - ${this.selectedRange.end})` : "Seleccionar Fecha y Hora", t = this.activeDate.getFullYear(), a = this.activeDate.getMonth(), i = this.dropdownSelectedDateString ? /* @__PURE__ */ new Date(this.dropdownSelectedDateString + "T00:00:00") : null, r = i && this.activeTimezone === "local" ? C(i, this.hostTimezone, "local") : 0, l = i ? this.slots.map((o) => {
|
|
1411
|
+
const p = I(i, o, this.rules), n = U(o, r), c = n.dayShift > 0 ? " (+1d)" : n.dayShift < 0 ? " (-1d)" : "";
|
|
1412
|
+
return {
|
|
1413
|
+
...o,
|
|
1414
|
+
displayStart: n.start + c,
|
|
1415
|
+
displayEnd: n.end + c,
|
|
1416
|
+
isBlocked: p
|
|
1417
|
+
};
|
|
1418
|
+
}) : [];
|
|
1419
|
+
return d`
|
|
1420
|
+
<div class="dropdown-container">
|
|
1421
|
+
<button class="btn btn-primary dropdown-toggle" @click=${() => this.dropdownOpen = !this.dropdownOpen}>
|
|
1422
|
+
<span>${e}</span> <span>${this.dropdownOpen ? "▲" : "▼"}</span>
|
|
1423
|
+
</button>
|
|
1424
|
+
|
|
1425
|
+
${this.dropdownOpen ? d`
|
|
1426
|
+
<div class="dropdown-card" style="--glatam-day-min-height: 38px;">
|
|
1427
|
+
${this.dropdownSelectedDateString ? d`
|
|
1428
|
+
<div style="display:flex; justify-content:space-between; align-items:center; border-bottom: 1px solid var(--glatam-border); padding-bottom:8px;">
|
|
1429
|
+
<button class="btn" style="height:28px; padding:0 8px; font-size:0.75rem;" @click=${() => this.dropdownSelectedDateString = ""}>< Volver</button>
|
|
1430
|
+
<span style="font-size:0.8rem; font-weight:600; color: var(--glatam-text);">${this.dropdownSelectedDateString}</span>
|
|
1431
|
+
</div>
|
|
1432
|
+
<div class="slot-list">
|
|
1433
|
+
${l.map((o) => d`
|
|
1434
|
+
<button
|
|
1435
|
+
class="slot-btn ${o.isBlocked ? "blocked" : ""}"
|
|
1436
|
+
?disabled=${o.isBlocked}
|
|
1437
|
+
@click=${() => this.selectDropdownSlot(o)}
|
|
1438
|
+
>
|
|
1439
|
+
${o.displayStart} - ${o.displayEnd} ${o.isBlocked ? "(Ocupado)" : ""}
|
|
1440
|
+
</button>
|
|
1441
|
+
`)}
|
|
1442
|
+
</div>
|
|
1443
|
+
` : d`
|
|
1444
|
+
<div style="font-weight:600; font-size:0.9rem; text-align:center; color: var(--glatam-text);">Selecciona un Día</div>
|
|
1445
|
+
<glatam-calendar-month-view
|
|
1446
|
+
.days=${A(t, a, this.rules, this.slots, this.startOfWeekDay)}
|
|
1447
|
+
.locale=${this.locale}
|
|
1448
|
+
.startOfWeekDay=${this.startOfWeekDay}
|
|
1449
|
+
.role=${this.role}
|
|
1450
|
+
size="small"
|
|
1451
|
+
.minDate=${this.minDate}
|
|
1452
|
+
.maxDate=${this.maxDate}
|
|
1453
|
+
.showNeighboringMonth=${this.showNeighboringMonth}
|
|
1454
|
+
.tileClassName=${this.tileClassName}
|
|
1455
|
+
@day-select=${this.handleDropdownDaySelect}
|
|
1456
|
+
></glatam-calendar-month-view>
|
|
1457
|
+
`}
|
|
1458
|
+
</div>
|
|
1459
|
+
` : ""}
|
|
1460
|
+
</div>
|
|
1461
|
+
`;
|
|
1462
|
+
}
|
|
1463
|
+
};
|
|
1464
|
+
b.styles = [
|
|
1465
|
+
P,
|
|
1466
|
+
W,
|
|
1467
|
+
E`
|
|
1468
|
+
:host {
|
|
1469
|
+
display: inline-block;
|
|
1470
|
+
background: transparent;
|
|
1471
|
+
border: none;
|
|
1472
|
+
padding: 0;
|
|
1473
|
+
box-shadow: none;
|
|
1474
|
+
width: 100%;
|
|
1475
|
+
}
|
|
1476
|
+
`
|
|
1477
|
+
];
|
|
1478
|
+
v([
|
|
1479
|
+
s({ type: String })
|
|
1480
|
+
], b.prototype, "role", 2);
|
|
1481
|
+
v([
|
|
1482
|
+
s({ type: String })
|
|
1483
|
+
], b.prototype, "locale", 2);
|
|
1484
|
+
v([
|
|
1485
|
+
s({ type: Number })
|
|
1486
|
+
], b.prototype, "startOfWeekDay", 2);
|
|
1487
|
+
v([
|
|
1488
|
+
s({ type: Array })
|
|
1489
|
+
], b.prototype, "rules", 2);
|
|
1490
|
+
v([
|
|
1491
|
+
s({ type: Object })
|
|
1492
|
+
], b.prototype, "selectedRange", 2);
|
|
1493
|
+
v([
|
|
1494
|
+
s({ type: String, reflect: !0 })
|
|
1495
|
+
], b.prototype, "size", 2);
|
|
1496
|
+
v([
|
|
1497
|
+
s({ type: String })
|
|
1498
|
+
], b.prototype, "hostTimezone", 2);
|
|
1499
|
+
v([
|
|
1500
|
+
s({ type: String })
|
|
1501
|
+
], b.prototype, "activeTimezone", 2);
|
|
1502
|
+
v([
|
|
1503
|
+
s({ type: String })
|
|
1504
|
+
], b.prototype, "minDate", 2);
|
|
1505
|
+
v([
|
|
1506
|
+
s({ type: String })
|
|
1507
|
+
], b.prototype, "maxDate", 2);
|
|
1508
|
+
v([
|
|
1509
|
+
s({ type: Boolean })
|
|
1510
|
+
], b.prototype, "showNeighboringMonth", 2);
|
|
1511
|
+
v([
|
|
1512
|
+
s({ attribute: !1 })
|
|
1513
|
+
], b.prototype, "tileClassName", 2);
|
|
1514
|
+
v([
|
|
1515
|
+
s({ type: Array })
|
|
1516
|
+
], b.prototype, "slots", 2);
|
|
1517
|
+
v([
|
|
1518
|
+
u()
|
|
1519
|
+
], b.prototype, "activeDate", 2);
|
|
1520
|
+
v([
|
|
1521
|
+
u()
|
|
1522
|
+
], b.prototype, "dropdownOpen", 2);
|
|
1523
|
+
v([
|
|
1524
|
+
u()
|
|
1525
|
+
], b.prototype, "dropdownSelectedDateString", 2);
|
|
1526
|
+
b = v([
|
|
1527
|
+
T("glatam-calendar-mini")
|
|
1528
|
+
], b);
|
|
1529
|
+
export {
|
|
1530
|
+
g as GlatamCalendar,
|
|
1531
|
+
S as GlatamCalendarDayView,
|
|
1532
|
+
b as GlatamCalendarMini,
|
|
1533
|
+
x as GlatamCalendarModal,
|
|
1534
|
+
f as GlatamCalendarMonthView,
|
|
1535
|
+
w as GlatamCalendarWeekView,
|
|
1536
|
+
W as calendarStyles,
|
|
1537
|
+
nt as formatISODate,
|
|
1538
|
+
dt as isTimeBlocked,
|
|
1539
|
+
ct as parseISODate,
|
|
1540
|
+
P as variablesStyles
|
|
1541
|
+
};
|