accomadesc 0.0.13 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/AccoCard.svelte +1 -1
  2. package/dist/AccoCard.svelte.d.ts +3 -2
  3. package/dist/AccoDescription.svelte +1 -1
  4. package/dist/AccoDescription.svelte.d.ts +3 -2
  5. package/dist/AmenitiesCore.svelte +3 -3
  6. package/dist/AmenitiesCore.svelte.d.ts +3 -2
  7. package/dist/BookingRequest.svelte +272 -0
  8. package/dist/BookingRequest.svelte.d.ts +5 -0
  9. package/dist/Calendar.svelte +26 -13
  10. package/dist/Calendar.svelte.d.ts +3 -2
  11. package/dist/CalendarAvailable.svelte +12 -19
  12. package/dist/CalendarAvailable.svelte.d.ts +3 -2
  13. package/dist/CalendarGrid.svelte +22 -0
  14. package/dist/CalendarGrid.svelte.d.ts +5 -0
  15. package/dist/CalendarRows.svelte +22 -0
  16. package/dist/CalendarRows.svelte.d.ts +5 -0
  17. package/dist/ContactForm.svelte +180 -0
  18. package/dist/ContactForm.svelte.d.ts +5 -0
  19. package/dist/LeafletMap.svelte +1 -1
  20. package/dist/LeafletMap.svelte.d.ts +1 -1
  21. package/dist/Photo.svelte +1 -1
  22. package/dist/Photo.svelte.d.ts +3 -2
  23. package/dist/PhotoGallery.svelte +89 -35
  24. package/dist/PhotoGallery.svelte.d.ts +3 -2
  25. package/dist/Pricing.svelte +1 -1
  26. package/dist/Pricing.svelte.d.ts +3 -2
  27. package/dist/PricingShort.svelte +1 -1
  28. package/dist/PricingShort.svelte.d.ts +3 -2
  29. package/dist/Section.svelte +1 -1
  30. package/dist/Section.svelte.d.ts +3 -2
  31. package/dist/Text.svelte +1 -1
  32. package/dist/Text.svelte.d.ts +3 -2
  33. package/dist/Weather.svelte +2 -3
  34. package/dist/Weather.svelte.d.ts +3 -2
  35. package/dist/basic/Avatar.svelte.d.ts +3 -2
  36. package/dist/basic/Button.svelte +6 -3
  37. package/dist/basic/Button.svelte.d.ts +4 -3
  38. package/dist/basic/Icon.svelte.d.ts +3 -2
  39. package/dist/basic/Notes.svelte +83 -0
  40. package/dist/basic/Notes.svelte.d.ts +7 -0
  41. package/dist/basic/Spinner.svelte.d.ts +3 -2
  42. package/dist/basic/TextInput.svelte.d.ts +3 -2
  43. package/dist/helpers/debounce.d.ts +7 -0
  44. package/dist/helpers/debounce.js +49 -0
  45. package/dist/helpers/iCSEventExample.ics +14 -0
  46. package/dist/helpers/normalizeDate.d.ts +2 -0
  47. package/dist/helpers/normalizeDate.js +53 -0
  48. package/dist/helpers/readICS.d.ts +7 -0
  49. package/dist/helpers/readICS.js +94 -0
  50. package/dist/index.d.ts +2 -2
  51. package/dist/index.js +1 -1
  52. package/dist/names/gen.js +3 -3
  53. package/dist/occuplan/OccuPlanAvailableInfo.svelte +38 -0
  54. package/dist/occuplan/OccuPlanAvailableInfo.svelte.d.ts +12 -0
  55. package/dist/occuplan/OccuPlanGrid.svelte +356 -0
  56. package/dist/occuplan/OccuPlanGrid.svelte.d.ts +13 -0
  57. package/dist/occuplan/OccuPlanPicker.svelte +559 -0
  58. package/dist/occuplan/OccuPlanPicker.svelte.d.ts +16 -0
  59. package/dist/occuplan/OccuPlanRows.svelte +360 -0
  60. package/dist/occuplan/OccuPlanRows.svelte.d.ts +13 -0
  61. package/dist/occuplan/OccuPlanWrapper.svelte +113 -0
  62. package/dist/occuplan/OccuPlanWrapper.svelte.d.ts +5 -0
  63. package/dist/occuplan/state.svelte.d.ts +90 -0
  64. package/dist/occuplan/state.svelte.js +383 -0
  65. package/dist/svg/ExtLinkSVG.svelte.d.ts +3 -2
  66. package/dist/svg/LinkSVG.svelte.d.ts +3 -2
  67. package/dist/types.d.ts +75 -4
  68. package/dist/types.js +20 -0
  69. package/package.json +64 -61
@@ -0,0 +1,360 @@
1
+ <script lang="ts">
2
+ import { DateTime, type DayNumbers, type MonthNumbers } from 'luxon';
3
+ import {
4
+ defaultMonthLabels,
5
+ defaultWeekendLabel,
6
+ OccupationState,
7
+ occupationTypeFormatting,
8
+ type OccupationType,
9
+ type OccuplanTranslations,
10
+ OCCUPATION_STATE,
11
+ type DayHelper,
12
+ type FirstMonth,
13
+ realFirstMonth,
14
+ } from './state.svelte.ts';
15
+ import Button from '../basic/Button.svelte';
16
+ import { browser } from '$app/environment';
17
+ import { getContext, setContext } from 'svelte';
18
+ import Spinner from '../basic/Spinner.svelte';
19
+
20
+ let {
21
+ url,
22
+ header = '',
23
+ footer = '',
24
+ weekendLabel = defaultWeekendLabel,
25
+ monthLabels = defaultMonthLabels,
26
+ numberOfMonth = 12,
27
+ firstMonth = 1,
28
+ maxWidth = '1200px',
29
+ maxDate = DateTime.utc().plus({ years: 2 }),
30
+ minDate = DateTime.utc(),
31
+ typeLabels = {
32
+ one: 'BOOKING',
33
+ two: 'RESERVATION',
34
+ three: 'PERSONAL',
35
+ },
36
+ }: OccuplanTranslations & {
37
+ url: string;
38
+ numberOfMonth?: number;
39
+ firstMonth?: FirstMonth;
40
+ minDate?: DateTime;
41
+ maxDate?: DateTime;
42
+ maxWidth?: string;
43
+ } = $props();
44
+
45
+ const oStateID = `i-${url}-${OCCUPATION_STATE}`;
46
+ let occupationState: OccupationState = $state(getContext(oStateID));
47
+ $effect(() => {
48
+ if (!occupationState && browser) {
49
+ occupationState = new OccupationState(url);
50
+ setContext(oStateID, occupationState);
51
+ }
52
+ });
53
+
54
+ let page: number = $state(0);
55
+ let rfMonth: number | DateTime = $derived(realFirstMonth(firstMonth, numberOfMonth, page));
56
+
57
+ let currentMaxDate = $derived(rfMonth.plus({ month: numberOfMonth }));
58
+
59
+ let months: DateTime[] = $derived.by(() => {
60
+ const result = [];
61
+ if (rfMonth.month == 1) {
62
+ //result.push(rfMonth);
63
+ }
64
+
65
+ let fMonth: DateTime = DateTime.utc(rfMonth.year, rfMonth.month, 1);
66
+ result.push(fMonth);
67
+
68
+ let nMonth = fMonth.plus({ months: 1 });
69
+ for (let c = 1; c < numberOfMonth; c++) {
70
+ result.push(nMonth);
71
+ nMonth = nMonth.plus({ months: 1 });
72
+ }
73
+ return result;
74
+ });
75
+
76
+ const nextClicked = () => {
77
+ page += 1;
78
+ };
79
+
80
+ const prevClicked = () => {
81
+ page -= 1;
82
+ };
83
+
84
+ const monthDays = [...Array(31).keys()].map((i) => i + 1);
85
+ let days: DayHelper[] = $derived.by(() => {
86
+ const ldays: DayHelper[] = [];
87
+ if (!browser) return ldays;
88
+ if (!occupationState || occupationState.loading) return ldays;
89
+ for (const m of months) {
90
+ for (let d: DayNumbers = 1; d <= 31; d++) {
91
+ const day: DayHelper = {
92
+ day: d,
93
+ month: m.month as MonthNumbers,
94
+ year: m.year,
95
+ };
96
+ ldays.push(day);
97
+ }
98
+ }
99
+ return ldays;
100
+ });
101
+
102
+ let monthGridTemplateColumns = $derived(
103
+ monthDays.reduce((s, d) => {
104
+ s += ` [d${d}] 1fr`;
105
+ return s;
106
+ }, '[rowLegend] 1.5fr'),
107
+ );
108
+
109
+ let monthGridTemplateRows = $derived(
110
+ months.reduce((s, m) => {
111
+ if (m.month == 1 && s != '[columnLegend] 1fr [firstYearRow] 1fr') {
112
+ s += ` [y${m.year}Row] 1fr`;
113
+ }
114
+
115
+ s += ` [m${m.month}y${m.year}] 1fr`;
116
+ return s;
117
+ }, '[columnLegend] 1fr [firstYearRow] 1fr'),
118
+ );
119
+
120
+ let foundOccupationTypes: OccupationType[] = $derived(
121
+ occupationState
122
+ ? occupationState.occupations.reduce((res, occupation) => {
123
+ if (!res.includes(occupation.type)) {
124
+ res.push(occupation.type);
125
+ }
126
+ return res;
127
+ }, [] as OccupationType[])
128
+ : [],
129
+ );
130
+
131
+ let width = $state(0);
132
+ </script>
133
+
134
+ {#if !occupationState || occupationState.loading}
135
+ <Spinner />
136
+ {/if}
137
+
138
+ <section class="occuplan-wrapper" bind:clientWidth={width} style="max-width: {maxWidth};">
139
+ <header class="occupation-plan-header">
140
+ <div class="header-controls">
141
+ {#if rfMonth >= minDate}
142
+ <Button text="<" clicked={prevClicked} />
143
+ {/if}
144
+ </div>
145
+ <div class="header-label"><h3>{@html header}</h3></div>
146
+ <div class="header-controls">
147
+ {#if currentMaxDate <= maxDate}
148
+ <Button text=">" clicked={nextClicked} />
149
+ {/if}
150
+ </div>
151
+ </header>
152
+ <main
153
+ style="
154
+ grid-template-columns: {monthGridTemplateColumns};
155
+ grid-template-rows: {monthGridTemplateRows};
156
+ "
157
+ >
158
+ <div
159
+ class="corner"
160
+ style="
161
+ grid-area: columnLegend / rowLegend / columnLegend / rowLegend;
162
+ background-color: var(--occuplan-bg-color-main);"
163
+ >
164
+ &nbsp;
165
+ </div>
166
+
167
+ {#each monthDays as d}
168
+ <div class="monthday-header" style="grid-area: columnLegend / d{d} / columnLegend / d{d};">
169
+ <span>{d}</span>
170
+ </div>
171
+ {/each}
172
+
173
+ <div class="year-label" style="grid-area: firstYearRow / d1 / firstYearRow / d31;">
174
+ <span>{rfMonth.year}</span>
175
+ </div>
176
+ {#each months as m, i (`${m.year}-${m.month}`)}
177
+ {#if m.month == 1 && i != 0}
178
+ <div class="year-label" style="grid-area: y{m.year}Row / d1 / y{m.year}Row / d31;">
179
+ <span>{m.year}</span>
180
+ </div>
181
+ {/if}
182
+ <div
183
+ class="month-label"
184
+ style="grid-area: m{m.month}y{m.year} / rowLegend / m{m.month}y{m.year} / rowLegend;"
185
+ >
186
+ <span>{monthLabels[m.month as MonthNumbers]}</span>
187
+ </div>
188
+ {/each}
189
+
190
+ {#if occupationState}
191
+ {#each days as d (`${d.year}-${d.month}-${d.day}`)}
192
+ <div
193
+ class="day"
194
+ style="
195
+ outline: var(--occuplan-grid-border);
196
+ grid-area: m{d.month}y{d.year} / d{d.day} / m{d.month}y{d.year} / d{d.day};
197
+ {occupationState.occupationStyle(d, true, maxDate)}
198
+ "
199
+ >
200
+ &nbsp;
201
+ </div>
202
+ {/each}
203
+ {/if}
204
+ </main>
205
+ <footer>
206
+ <div class="legend">
207
+ <span>{weekendLabel}</span>
208
+ <div
209
+ id="weekend-legend"
210
+ class="legend-entry-marker"
211
+ style="
212
+ outline: var(--occuplan-grid-border);
213
+ background: radial-gradient(var(--occuplan-bg-color-weekend), var(--occuplan-bg-color-main), var(--occuplan-bg-color-main));
214
+ "
215
+ >
216
+ &nbsp;
217
+ </div>
218
+ {#each foundOccupationTypes as t}
219
+ {@const format = occupationTypeFormatting(t)}
220
+ <span>{typeLabels[t]}</span>
221
+ <div
222
+ id="occupation-type-{t}-legend"
223
+ class="legend-entry-marker"
224
+ style="background-color: {format.bgColor}; outline: var(--occuplan-grid-border);"
225
+ >
226
+ &nbsp;
227
+ </div>
228
+ {/each}
229
+ </div>
230
+ <div class="footer-content">
231
+ {@html footer}
232
+ </div>
233
+ </footer>
234
+ </section>
235
+
236
+ <style>
237
+ .footer-content {
238
+ display: flex;
239
+ flex-direction: column;
240
+ justify-content: flex-end;
241
+ }
242
+
243
+ .legend {
244
+ display: grid;
245
+ grid-template-columns: [label] 1fr [marker] 1rem;
246
+ column-gap: 1rem;
247
+ text-transform: capitalize;
248
+ font-variant: small-caps;
249
+ }
250
+
251
+ .legend-entry-marker {
252
+ width: 1rem;
253
+ height: 1rem;
254
+ }
255
+
256
+ main {
257
+ display: grid;
258
+ width: 100%;
259
+ overflow-x: auto;
260
+ }
261
+
262
+ .month-label {
263
+ aspect-ratio: 3 / 2;
264
+ display: flex;
265
+ align-items: center;
266
+ border-bottom: var(--occuplan-grid-border);
267
+ border-top: var(--occuplan-grid-border);
268
+ color: var(--occuplan-font-color-months);
269
+ background-color: var(--occuplan-bg-color-months);
270
+ container-type: size;
271
+ container-name: month-label;
272
+ padding-left: 0.3rem;
273
+ }
274
+
275
+ @container month-label (min-height: 0) {
276
+ .month-label span {
277
+ font-size: 55cqh;
278
+ }
279
+ }
280
+
281
+ .monthday-header {
282
+ text-align: center;
283
+ aspect-ratio: 1;
284
+ display: inline-grid;
285
+ align-content: center;
286
+ outline: var(--occuplan-grid-border);
287
+ background-color: var(--occuplan-bg-color-days-header);
288
+ color: var(--occuplan-font-color-days-header);
289
+ container-type: size;
290
+ container-name: month-header;
291
+ }
292
+
293
+ @container month-header (min-width: 0) {
294
+ .monthday-header span {
295
+ font-size: 55cqh;
296
+ }
297
+ }
298
+
299
+ .occupation-plan-header {
300
+ display: flex;
301
+ flex-direction: row;
302
+ width: 100%;
303
+ justify-content: space-between;
304
+ margin-bottom: 0.5rem;
305
+ }
306
+
307
+ .header-label {
308
+ text-transform: capitalize;
309
+ font-variant: small-caps;
310
+ font-weight: bold;
311
+
312
+ h3 {
313
+ padding-top: 0;
314
+ padding-bottom: 0.2rem;
315
+ }
316
+ }
317
+
318
+ .header-controls {
319
+ width: 2rem;
320
+ }
321
+
322
+ .occuplan-wrapper {
323
+ height: 100%;
324
+ width: calc(100% - 0.5rem);
325
+ padding: 0.5rem;
326
+ margin: 0;
327
+ display: flex;
328
+ flex-direction: column;
329
+ flex-wrap: nowrap;
330
+ align-items: center;
331
+
332
+ border: var(--occuplan-main-border);
333
+ color: var(--occuplan-font-color-main);
334
+ background-color: var(--occuplan-bg-color-main);
335
+ }
336
+
337
+ footer {
338
+ display: flex;
339
+ flex-direction: row;
340
+ align-items: stretch;
341
+ justify-content: space-between;
342
+ width: 100%;
343
+ margin-top: 1rem;
344
+ }
345
+
346
+ .year-label {
347
+ display: flex;
348
+ justify-content: center;
349
+ align-items: center;
350
+ container-type: size;
351
+ container-name: year-label;
352
+ text-decoration: underline;
353
+ }
354
+
355
+ @container year-label (min-width: 0) {
356
+ .year-label span {
357
+ font-size: 65cqh;
358
+ }
359
+ }
360
+ </style>
@@ -0,0 +1,13 @@
1
+ import { DateTime } from 'luxon';
2
+ import { type OccuplanTranslations, type FirstMonth } from './state.svelte.ts';
3
+ type $$ComponentProps = OccuplanTranslations & {
4
+ url: string;
5
+ numberOfMonth?: number;
6
+ firstMonth?: FirstMonth;
7
+ minDate?: DateTime;
8
+ maxDate?: DateTime;
9
+ maxWidth?: string;
10
+ };
11
+ declare const OccuPlanRows: import("svelte").Component<$$ComponentProps, {}, "">;
12
+ type OccuPlanRows = ReturnType<typeof OccuPlanRows>;
13
+ export default OccuPlanRows;
@@ -0,0 +1,113 @@
1
+ <script lang="ts">
2
+ import OccuPlanGrid from './OccuPlanGrid.svelte';
3
+ import OccuPlanRows from './OccuPlanRows.svelte';
4
+ import { getContext, setContext } from 'svelte';
5
+ import {
6
+ OCCUPATION_STATE,
7
+ OccupationState,
8
+ type OccuplanTranslations,
9
+ type OccuplanMiscProps,
10
+ defaultWeekendLabel,
11
+ defaultMonthLabels,
12
+ defaultWeekdayLabels,
13
+ defaultMonthHeaderFormat,
14
+ } from './state.svelte.ts';
15
+ import { DateTime } from 'luxon';
16
+
17
+ let {
18
+ url,
19
+ header = '',
20
+ footer = '',
21
+ weekendLabel = defaultWeekendLabel,
22
+ monthLabels = defaultMonthLabels,
23
+ weekdayLabels = defaultWeekdayLabels,
24
+ monthHeaderFormat = defaultMonthHeaderFormat,
25
+ gridNumberOfMonths = 8,
26
+ gridFirstMonth = '-1',
27
+ gridMaxWidth = '1200px',
28
+ rowsNumberOfMonths = 12,
29
+ rowsFirstMonth = 1,
30
+ rowsMaxWidth = '1200px',
31
+ toggleGridOffset = 640,
32
+ toggleRowsOffset = 640,
33
+ maxDate = DateTime.utc().plus({ years: 2 }),
34
+ minDate = DateTime.utc(),
35
+ nextPage = '>',
36
+ prevPage = '<',
37
+ typeLabels = {
38
+ one: 'BOOKING',
39
+ two: 'RESERVATION',
40
+ three: 'PERSONAL',
41
+ },
42
+ }: OccuplanTranslations & OccuplanMiscProps = $props();
43
+
44
+ const oStateID = `i-${url}-${OCCUPATION_STATE}`;
45
+ let occupationState: OccupationState = getContext(oStateID);
46
+ if (!occupationState) {
47
+ occupationState = new OccupationState(url);
48
+ setContext(oStateID, occupationState);
49
+ }
50
+
51
+ /*
52
+ use different component based on different media size.
53
+ */
54
+ let w: number = $state(0);
55
+ let showGrid: boolean = $state(false);
56
+ let showRows: boolean = $state(true);
57
+
58
+ $effect(() => {
59
+ if (w < toggleGridOffset && showRows) {
60
+ showGrid = true;
61
+ showRows = false;
62
+ }
63
+ });
64
+ $effect(() => {
65
+ if (w > toggleRowsOffset && showGrid) {
66
+ showRows = true;
67
+ showGrid = false;
68
+ }
69
+ });
70
+ </script>
71
+
72
+ <div class="calendar-wrapper" bind:clientWidth={w}>
73
+ {#if showRows}
74
+ <OccuPlanRows
75
+ {url}
76
+ {header}
77
+ {footer}
78
+ {weekendLabel}
79
+ {monthLabels}
80
+ {maxDate}
81
+ {minDate}
82
+ maxWidth={rowsMaxWidth}
83
+ numberOfMonth={rowsNumberOfMonths}
84
+ firstMonth={rowsFirstMonth}
85
+ {typeLabels}
86
+ />
87
+ {:else if showGrid}
88
+ <OccuPlanGrid
89
+ {url}
90
+ {header}
91
+ {footer}
92
+ {nextPage}
93
+ {prevPage}
94
+ {weekdayLabels}
95
+ {monthLabels}
96
+ {maxDate}
97
+ {minDate}
98
+ maxWidth={gridMaxWidth}
99
+ {monthHeaderFormat}
100
+ numberOfMonth={gridNumberOfMonths}
101
+ firstMonth={gridFirstMonth}
102
+ {typeLabels}
103
+ />
104
+ {/if}
105
+ </div>
106
+
107
+ <style>
108
+ .calendar-wrapper {
109
+ min-width: 210px;
110
+ max-width: 110rem;
111
+ width: 100%;
112
+ }
113
+ </style>
@@ -0,0 +1,5 @@
1
+ import { type OccuplanTranslations, type OccuplanMiscProps } from './state.svelte.ts';
2
+ type $$ComponentProps = OccuplanTranslations & OccuplanMiscProps;
3
+ declare const OccuPlanWrapper: import("svelte").Component<$$ComponentProps, {}, "">;
4
+ type OccuPlanWrapper = ReturnType<typeof OccuPlanWrapper>;
5
+ export default OccuPlanWrapper;
@@ -0,0 +1,90 @@
1
+ import { DateTime, type MonthNumbers, type WeekdayNumbers } from 'luxon';
2
+ export interface AvailableSpans {
3
+ [key: number]: DateTime | null;
4
+ }
5
+ export interface Occupation {
6
+ arrival: DateTime;
7
+ leave: DateTime;
8
+ type: OccupationType;
9
+ }
10
+ export type OccupationCallback = (occupation: Occupation) => void;
11
+ export type WeekdayLabels = {
12
+ [key in WeekdayNumbers]: string;
13
+ };
14
+ export type MonthLabels = {
15
+ [key in MonthNumbers]: string;
16
+ };
17
+ export type OccupationType = 'one' | 'two' | 'three';
18
+ export declare const OCCUPATION_STATE = "occupation-state";
19
+ export declare const occupationTypeFormattingByOccupation: (o?: Occupation) => {
20
+ fontColor: string;
21
+ bgColor: string;
22
+ };
23
+ export declare const occupationTypeFormatting: (t?: OccupationType) => {
24
+ fontColor: string;
25
+ bgColor: string;
26
+ };
27
+ export interface DayHelper {
28
+ day: number;
29
+ month: MonthNumbers;
30
+ year: number;
31
+ }
32
+ export declare const firstMonthValid: (value: string | number) => boolean;
33
+ export declare const realFirstMonth: (firstMonth: FirstMonth, numberOfMonth: number, page: number) => DateTime;
34
+ export interface OccuplanTranslations {
35
+ arrivalLabel?: string;
36
+ leaveLabel?: string;
37
+ header?: string;
38
+ footer?: string;
39
+ weekendLabel?: string;
40
+ weekdayLabels?: WeekdayLabels;
41
+ monthLabels?: MonthLabels;
42
+ monthHeaderFormat?: string;
43
+ datePickerDateFormat?: string;
44
+ numberOfNights?: string;
45
+ nextPage?: string;
46
+ prevPage?: string;
47
+ typeLabels?: Record<OccupationType, string>;
48
+ }
49
+ export type NextMonthNumbers = '+1' | '+2' | '+3' | '+4' | '+5' | '+6' | '+7' | '+8' | '+9' | '+10' | '+11' | '+12';
50
+ export type PrevMonthNumbers = '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12';
51
+ export type FirstMonth = MonthNumbers | NextMonthNumbers | PrevMonthNumbers | 0;
52
+ export interface OccuplanMiscProps {
53
+ url: string;
54
+ gridNumberOfMonths: number;
55
+ gridFirstMonth: FirstMonth;
56
+ gridMaxWidth: string;
57
+ rowsNumberOfMonths: number;
58
+ rowsFirstMonth: FirstMonth;
59
+ rowsMaxWidth: string;
60
+ minDate: DateTime;
61
+ maxDate: DateTime;
62
+ toggleGridOffset: number;
63
+ toggleRowsOffset: number;
64
+ }
65
+ export declare const defaultWeekendLabel = "Weekend";
66
+ export declare const defaultWeekdayLabels: WeekdayLabels;
67
+ export declare const defaultMonthLabels: MonthLabels;
68
+ export declare const defaultMonthHeaderFormat = "{{month}} / {{year}}";
69
+ export declare class OccupationState {
70
+ iCalURL: string;
71
+ occupiedDays: Record<string, boolean>;
72
+ occupations: Occupation[];
73
+ loading: boolean;
74
+ constructor(iCalURL: string);
75
+ private loadOccupations;
76
+ private eventsIncomingCallback;
77
+ private dayKey;
78
+ private updateOccupiedDays;
79
+ firstFree: (maxFutureDate: DateTime) => DateTime;
80
+ earliestRequestStart: (currentEnd: DateTime | undefined) => DateTime | undefined;
81
+ latestRequestEnd: (maxFutureDate: DateTime, currentStart: DateTime | undefined) => DateTime | undefined;
82
+ calcAvailability: (search: number[], maxFutureDate: DateTime) => AvailableSpans;
83
+ dayOccupied: (day: DateTime) => boolean;
84
+ startingOccupation: (d: DateTime) => Occupation | undefined;
85
+ endingOccupation: (d: DateTime) => Occupation | undefined;
86
+ fullOccupation: (d: DateTime) => Occupation | undefined;
87
+ validRequest: (from: DateTime, to: DateTime) => boolean;
88
+ occupationStyle: (d: DayHelper, highlightWeekend: boolean | undefined, maxDate: DateTime) => string;
89
+ }
90
+ export declare const getOccupationState: (url: string) => OccupationState;