accomadesc 0.4.24 → 0.4.26
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/BookingRequest.svelte +14 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +8 -1
- package/dist/types.d.ts +3 -0
- package/package.json +13 -12
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
sentErroredText,
|
|
26
26
|
submitText,
|
|
27
27
|
invalidText,
|
|
28
|
+
accoInactiveText,
|
|
28
29
|
maxCharsAllowed = 300,
|
|
29
30
|
preview = false,
|
|
30
31
|
translateFunc,
|
|
@@ -51,9 +52,10 @@
|
|
|
51
52
|
);
|
|
52
53
|
|
|
53
54
|
let errored = $state(false);
|
|
55
|
+
let unavailable = $state(false);
|
|
54
56
|
let successfullySent = $state(false);
|
|
55
57
|
let sending = $state(false);
|
|
56
|
-
let disabled = $derived(preview || errored || successfullySent);
|
|
58
|
+
let disabled = $derived(preview || errored || unavailable || successfullySent);
|
|
57
59
|
|
|
58
60
|
const stateID = contextKey(untrack(() => calUrl));
|
|
59
61
|
let ss: OccupationState = getContext(stateID);
|
|
@@ -123,7 +125,10 @@
|
|
|
123
125
|
leave: leave?.toISO(),
|
|
124
126
|
}),
|
|
125
127
|
});
|
|
126
|
-
if (response.status
|
|
128
|
+
if (response.status == 410) {
|
|
129
|
+
unavailable = true;
|
|
130
|
+
console.log('Accommodation no longer available for booking');
|
|
131
|
+
} else if (response.status != 201) {
|
|
127
132
|
errored = true;
|
|
128
133
|
console.log('Error sending mail', response.status, response.statusText);
|
|
129
134
|
} else {
|
|
@@ -230,6 +235,13 @@
|
|
|
230
235
|
{translateFunc ? translateFunc(sentErroredText) : 'Error Occurred Sending Email'}
|
|
231
236
|
</div>
|
|
232
237
|
{/if}
|
|
238
|
+
{#if unavailable}
|
|
239
|
+
<div class="message error">
|
|
240
|
+
{translateFunc && accoInactiveText
|
|
241
|
+
? translateFunc(accoInactiveText)
|
|
242
|
+
: 'This accommodation is no longer available for booking.'}
|
|
243
|
+
</div>
|
|
244
|
+
{/if}
|
|
233
245
|
{#if invalid || preview}
|
|
234
246
|
<div class="message error">
|
|
235
247
|
{translateFunc ? translateFunc(invalidText) : 'Dates Are Not Available'}
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,15 @@ import Section from './Section.svelte';
|
|
|
26
26
|
import Text from './Text.svelte';
|
|
27
27
|
import Weather from './Weather.svelte';
|
|
28
28
|
import PageComponent from './PageComponent.svelte';
|
|
29
|
-
|
|
29
|
+
import OccuPlanAvailableInfo from './occuplan/OccuPlanAvailableInfo.svelte';
|
|
30
|
+
import OccuPlanGrid from './occuplan/OccuPlanGrid.svelte';
|
|
31
|
+
import OccuPlanPicker from './occuplan/OccuPlanPicker.svelte';
|
|
32
|
+
import OccuPlanRows from './occuplan/OccuPlanRows.svelte';
|
|
33
|
+
import OccuPlanWrapper from './occuplan/OccuPlanWrapper.svelte';
|
|
34
|
+
import { OccupationState, contextKey, occupationTypeFormatting, occupationTypeFormattingByOccupation, defaultWeekendLabel, defaultWeekdayLabels, defaultMonthLabels, defaultMonthHeaderFormat } from './occuplan/state.svelte.js';
|
|
35
|
+
import { getEvents } from './helpers/readICS.js';
|
|
36
|
+
export type { OccuplanTranslations, Occupation, OccupationCallback, OccupationType, AvailableSpans, WeekdayLabels, MonthLabels, } from './occuplan/state.svelte.js';
|
|
37
|
+
export type { GetEventsResult } from './helpers/readICS.js';
|
|
30
38
|
export type { GridPhoto, LeafletMap as LeafletMapI, LeafletMapContent, Calendar as CalendarI, CalendarContent, CalendarAvailable as CalendarAvailableI, CalendarAvailableContent, CalendarGrid as CalendarGridI, CalendarGridContent, CalendarRows as CalendarRowsI, CalendarRowsContent, Text as TextI, TextContent, Weather as WeatherI, WeatherContent, Photo as PhotoI, PhotoContent, PhotoGallery as PhotoGalleryI, PhotoGalleryContent, Pricing as PricingI, PricingContent, PricingShort as PricingShortI, PricingShortContent, PricingEntry, PricingRange, PricingColumn, StaticRangeDate, StaticPricingRange, AmenitiesCore as AmenitiesCoreI, AmenitiesCoreContent, AccoCard as AccoCardI, AccoCardContent, ContactForm as ContactFormI, ContactFormContent, BookingRequest as BookingRequestI, BookingRequestContent, AccoDescription as AccoDescriptionI, AccoDescriptionContent, Section as SectionI, I18nFacade, AccoBlock, Block, PageProps, PageConfig, Nav as NavI, Style, NavItem, FormatSpec, FormatTemplateName, SiteConfig, LangConfig, CookieConfig, SiteFonts, SiteTranslation, FontSpec, Hero, } from './types.js';
|
|
31
39
|
export { PRICING_COLUMNS, BLOCK_KINDS, isAccoCard, isText, isPhoto, isGallery, isLeafletMap, isWeather, isAmenitiesCore, isCalendarAvailable, isCalendar, isCalendarGrid, isCalendarRows, isPricing, isPricingShort, isAccoDescription, isBookingRequest, isContactForm, isAccoBlock, } from './types.js';
|
|
32
|
-
export { randomID, randomName, format, MoneyFormats, Avatar, Button, Icon, Spinner, TextInput, AccoCard, AccoDescription, AmenitiesCore, Calendar, CalendarAvailable, LeafletMap, Photo, PhotoGallery, Pricing, PricingShort, Section, Text, Weather, BookingRequest, ContactForm, CalendarRows, CalendarGrid, Notes, PageComponent, SiteState, };
|
|
40
|
+
export { randomID, randomName, format, MoneyFormats, Avatar, Button, Icon, Spinner, TextInput, AccoCard, AccoDescription, AmenitiesCore, Calendar, CalendarAvailable, LeafletMap, Photo, PhotoGallery, Pricing, PricingShort, Section, Text, Weather, BookingRequest, ContactForm, CalendarRows, CalendarGrid, Notes, PageComponent, SiteState, OccuPlanAvailableInfo, OccuPlanGrid, OccuPlanPicker, OccuPlanRows, OccuPlanWrapper, OccupationState, contextKey, occupationTypeFormatting, occupationTypeFormattingByOccupation, defaultWeekendLabel, defaultWeekdayLabels, defaultMonthLabels, defaultMonthHeaderFormat, getEvents, };
|
package/dist/index.js
CHANGED
|
@@ -27,5 +27,12 @@ import Section from './Section.svelte';
|
|
|
27
27
|
import Text from './Text.svelte';
|
|
28
28
|
import Weather from './Weather.svelte';
|
|
29
29
|
import PageComponent from './PageComponent.svelte';
|
|
30
|
+
import OccuPlanAvailableInfo from './occuplan/OccuPlanAvailableInfo.svelte';
|
|
31
|
+
import OccuPlanGrid from './occuplan/OccuPlanGrid.svelte';
|
|
32
|
+
import OccuPlanPicker from './occuplan/OccuPlanPicker.svelte';
|
|
33
|
+
import OccuPlanRows from './occuplan/OccuPlanRows.svelte';
|
|
34
|
+
import OccuPlanWrapper from './occuplan/OccuPlanWrapper.svelte';
|
|
35
|
+
import { OccupationState, contextKey, occupationTypeFormatting, occupationTypeFormattingByOccupation, defaultWeekendLabel, defaultWeekdayLabels, defaultMonthLabels, defaultMonthHeaderFormat, } from './occuplan/state.svelte.js';
|
|
36
|
+
import { getEvents } from './helpers/readICS.js';
|
|
30
37
|
export { PRICING_COLUMNS, BLOCK_KINDS, isAccoCard, isText, isPhoto, isGallery, isLeafletMap, isWeather, isAmenitiesCore, isCalendarAvailable, isCalendar, isCalendarGrid, isCalendarRows, isPricing, isPricingShort, isAccoDescription, isBookingRequest, isContactForm, isAccoBlock, } from './types.js';
|
|
31
|
-
export { randomID, randomName, format, MoneyFormats, Avatar, Button, Icon, Spinner, TextInput, AccoCard, AccoDescription, AmenitiesCore, Calendar, CalendarAvailable, LeafletMap, Photo, PhotoGallery, Pricing, PricingShort, Section, Text, Weather, BookingRequest, ContactForm, CalendarRows, CalendarGrid, Notes, PageComponent, SiteState, };
|
|
38
|
+
export { randomID, randomName, format, MoneyFormats, Avatar, Button, Icon, Spinner, TextInput, AccoCard, AccoDescription, AmenitiesCore, Calendar, CalendarAvailable, LeafletMap, Photo, PhotoGallery, Pricing, PricingShort, Section, Text, Weather, BookingRequest, ContactForm, CalendarRows, CalendarGrid, Notes, PageComponent, SiteState, OccuPlanAvailableInfo, OccuPlanGrid, OccuPlanPicker, OccuPlanRows, OccuPlanWrapper, OccupationState, contextKey, occupationTypeFormatting, occupationTypeFormattingByOccupation, defaultWeekendLabel, defaultWeekdayLabels, defaultMonthLabels, defaultMonthHeaderFormat, getEvents, };
|
package/dist/types.d.ts
CHANGED
|
@@ -283,6 +283,9 @@ export interface BookingRequestContent {
|
|
|
283
283
|
successfullySentText: string;
|
|
284
284
|
sentErroredText: string;
|
|
285
285
|
invalidText: string;
|
|
286
|
+
/** Optional: shown when the server answers 410 (acco deactivated). Falls
|
|
287
|
+
back to an English default so older published configs keep working. */
|
|
288
|
+
accoInactiveText?: string;
|
|
286
289
|
messageLabel: string;
|
|
287
290
|
explainer: string;
|
|
288
291
|
maxCharsAllowed?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "accomadesc",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.26",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
|
-
"svelte": "./dist/index.js"
|
|
19
|
+
"svelte": "./dist/index.js",
|
|
20
|
+
"default": "./dist/index.js"
|
|
20
21
|
}
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
@@ -32,23 +33,23 @@
|
|
|
32
33
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
33
34
|
"@sveltejs/kit": "^2.70.3",
|
|
34
35
|
"@sveltejs/package": "^2.5.8",
|
|
35
|
-
"@sveltejs/vite-plugin-svelte": "^7.3.
|
|
36
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
36
37
|
"@testing-library/dom": "^10.4.2",
|
|
37
38
|
"@testing-library/jest-dom": "^7.0.1",
|
|
38
39
|
"@testing-library/svelte": "^5.4.2",
|
|
39
|
-
"@types/luxon": "^3.7.
|
|
40
|
-
"@types/node": "^26.6.
|
|
41
|
-
"@vitest/ui": "^5.0.
|
|
40
|
+
"@types/luxon": "^3.7.6",
|
|
41
|
+
"@types/node": "^26.6.3",
|
|
42
|
+
"@vitest/ui": "^5.0.3",
|
|
42
43
|
"gdpr-cooco-banner": "^0.0.13",
|
|
43
|
-
"jsdom": "^30.
|
|
44
|
-
"prettier": "^3.9.
|
|
44
|
+
"jsdom": "^30.1.1",
|
|
45
|
+
"prettier": "^3.9.9",
|
|
45
46
|
"prettier-plugin-svelte": "^4.1.1",
|
|
46
47
|
"publint": "^0.3.24",
|
|
47
|
-
"svelte": "^5.57.
|
|
48
|
+
"svelte": "^5.57.1",
|
|
48
49
|
"svelte-check": "^4.7.6",
|
|
49
|
-
"typescript": "6",
|
|
50
|
-
"vite": "^8.3.
|
|
51
|
-
"vitest": "^5.0.
|
|
50
|
+
"typescript": "^6.0.3",
|
|
51
|
+
"vite": "^8.3.1",
|
|
52
|
+
"vitest": "^5.0.3"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
55
|
"@sveltejs/kit": "^2.15.2",
|