accomadesc 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,12 +19,15 @@
19
19
  maxFutureYears = 2,
20
20
  translateFunc,
21
21
  }: CalendarContent & I18nFacade & { debug?: boolean } = $props();
22
+
23
+ let minDate = $derived(DateTime.utc().minus({ year: maxPastYears }));
24
+ let maxDate = $derived(DateTime.utc().plus({ year: maxFutureYears }));
22
25
  </script>
23
26
 
24
27
  <div class="cal-wrapper">
25
28
  <OccuPlanWrapper
26
- minDate={DateTime.utc().set({ day: 1, month: 1 }).minus({ year: maxPastYears })}
27
- maxDate={DateTime.utc().set({ day: 31, month: 12 }).plus({ year: maxFutureYears })}
29
+ {minDate}
30
+ {maxDate}
28
31
  {url}
29
32
  {debug}
30
33
  {toggleGridOffset}
@@ -16,7 +16,9 @@
16
16
 
17
17
  let availHeader = $derived(translateFunc ? translateFunc('availability') : '[AVAILABILITY]');
18
18
 
19
- const maxFutureDate = DateTime.utc().set({ day: 31, month: 12 }).plus({ years: maxFutureYears });
19
+ let maxFutureDate = $derived(
20
+ DateTime.utc().set({ day: 31, month: 12 }).plus({ years: maxFutureYears }),
21
+ );
20
22
 
21
23
  const formatAvailability = (from: DateTime | null, forDays: number): string => {
22
24
  if (!formatFunc || !formatDateFunc) return '';
@@ -11,14 +11,17 @@
11
11
  maxFutureYears = 2,
12
12
  translateFunc,
13
13
  }: CalendarGridContent & I18nFacade & { debug?: boolean } = $props();
14
+
15
+ let minDate = $derived(DateTime.utc().minus({ year: maxPastYears }));
16
+ let maxDate = $derived(DateTime.utc().plus({ year: maxFutureYears }));
14
17
  </script>
15
18
 
16
19
  <div class="cal-wrapper">
17
20
  <OccuPlanGrid
18
21
  {url}
19
22
  {debug}
20
- minDate={DateTime.utc().set({ day: 1, month: 1 }).minus({ year: maxPastYears })}
21
- maxDate={DateTime.utc().set({ day: 31, month: 12 }).plus({ year: maxFutureYears })}
23
+ {minDate}
24
+ {maxDate}
22
25
  header={translateFunc ? translateFunc('calendarHeader') : ''}
23
26
  {...calendarTranslation}
24
27
  />
@@ -11,14 +11,16 @@
11
11
  maxFutureYears = 2,
12
12
  translateFunc,
13
13
  }: CalendarRowsContent & I18nFacade & { debug?: boolean } = $props();
14
+ let minDate = $derived(DateTime.utc().minus({ year: maxPastYears }));
15
+ let maxDate = $derived(DateTime.utc().plus({ year: maxFutureYears }));
14
16
  </script>
15
17
 
16
18
  <div class="cal-wrapper">
17
19
  <OccuPlanRows
18
20
  {url}
19
21
  {debug}
20
- minDate={DateTime.utc().set({ day: 1, month: 1 }).minus({ years: maxPastYears })}
21
- maxDate={DateTime.utc().set({ day: 31, month: 12 }).plus({ years: maxFutureYears })}
22
+ {maxDate}
23
+ {minDate}
22
24
  header={translateFunc ? translateFunc('calendarHeader') : ''}
23
25
  {...calendarTranslation}
24
26
  />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accomadesc",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",