@lupinum/ginko 0.4.0 → 0.5.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.
- package/CHANGELOG.md +150 -0
- package/README.md +2 -2
- package/dist/basics.d.mts +492 -0
- package/dist/basics.d.ts +492 -0
- package/dist/basics.mjs +416 -0
- package/dist/cli/index.mjs +54 -55
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.mjs +3 -3
- package/dist/internal/search.mjs +6 -3
- package/dist/internal.d.mts +387 -41
- package/dist/internal.d.ts +387 -41
- package/dist/internal.mjs +267 -101
- package/dist/nuxt/module.d.mts +2 -2
- package/dist/nuxt/module.d.ts +2 -2
- package/dist/nuxt/module.mjs +105 -13
- package/dist/nuxt/runtime/GinkoImage.d.mts +1 -1
- package/dist/nuxt/runtime/GinkoMarkdown.mjs +2 -2
- package/dist/nuxt/runtime/composables.d.mts +4 -3
- package/dist/nuxt/runtime/composables.mjs +19 -15
- package/dist/nuxt/runtime/fetch.d.mts +3 -1
- package/dist/nuxt/runtime/fetch.mjs +12 -6
- package/dist/nuxt/runtime/markdown.d.mts +3 -0
- package/dist/nuxt/runtime/markdown.mjs +15 -3
- package/dist/nuxt/runtime/plugin.mjs +6 -35
- package/dist/nuxt/runtime/preview-listener.d.mts +13 -0
- package/dist/nuxt/runtime/preview-listener.mjs +37 -0
- package/dist/nuxt/runtime/preview.vue +3 -1
- package/dist/nuxt/runtime/schema.d.ts +6 -0
- package/dist/nuxt/runtime/server/bundles.d.ts +4 -0
- package/dist/nuxt/runtime/server/files-md.d.ts +2 -0
- package/dist/nuxt/runtime/server/files.d.ts +2 -0
- package/dist/nuxt/runtime/server/headers.d.ts +2 -0
- package/dist/nuxt/runtime/server/items.d.mts +12 -0
- package/dist/nuxt/runtime/server/items.d.ts +12 -0
- package/dist/nuxt/runtime/server/items.mjs +17 -0
- package/dist/nuxt/runtime/server/llms-full.d.ts +2 -0
- package/dist/nuxt/runtime/server/llms.d.ts +2 -0
- package/dist/nuxt/runtime/server/markdown-trees.d.ts +2 -0
- package/dist/nuxt/runtime/server/markdown.d.ts +2 -0
- package/dist/nuxt/runtime/server/markdown.mjs +1 -1
- package/dist/nuxt/runtime/server/platform-md.d.mts +3 -0
- package/dist/nuxt/runtime/server/platform-md.d.ts +3 -0
- package/dist/nuxt/runtime/server/platform-md.mjs +71 -0
- package/dist/nuxt/runtime/server/redirects.d.ts +2 -0
- package/dist/nuxt/runtime/server/robots.d.ts +2 -0
- package/dist/nuxt/runtime/server/search.d.ts +2 -0
- package/dist/nuxt/runtime/server/site-config.d.ts +14 -0
- package/dist/nuxt/runtime/server/sitemap-source.d.ts +2 -0
- package/dist/nuxt/runtime/server/sitemap-xml.d.ts +24 -0
- package/dist/nuxt/runtime/server/sitemap.d.ts +2 -0
- package/dist/nuxt/runtime/shared.d.mts +10 -3
- package/dist/nuxt/runtime/shared.mjs +2 -2
- package/dist/shared/ginko.1wwZv4B_.d.ts +1622 -0
- package/dist/shared/{ginko.BBkZW2nW.d.ts → ginko.6cI8KXZP.d.mts} +2 -2
- package/dist/shared/{ginko.CQvxhyez.mjs → ginko.AprJymER.mjs} +30 -1
- package/dist/shared/ginko.BNVC-g9n.mjs +10389 -0
- package/dist/shared/{ginko.Bwan3BB-.d.mts → ginko.B_pACpVU.d.ts} +2 -2
- package/dist/shared/{ginko.CrNRBkS5.mjs → ginko.C4gcOovG.mjs} +253 -309
- package/dist/shared/{ginko.C90fPpMP.mjs → ginko.CXA2R3aS.mjs} +128 -101
- package/dist/shared/ginko.CjWB8N7f.d.ts +128 -0
- package/dist/shared/ginko.D1PeQ3ds.mjs +36 -0
- package/dist/shared/ginko.DIl7l-75.mjs +26 -0
- package/dist/shared/ginko.DY7RbCEw.mjs +601 -0
- package/dist/shared/ginko.Dmgixfpf.mjs +130 -0
- package/dist/shared/{ginko.D-fNojn9.d.mts → ginko.DrkUeYFP.d.mts} +824 -10
- package/dist/shared/{ginko.D-fNojn9.d.ts → ginko.DrkUeYFP.d.ts} +824 -10
- package/dist/shared/{ginko.akHewCGt.d.mts → ginko.DvPtlHIz.d.mts} +50 -5
- package/dist/shared/{ginko.BDF3bW0C.d.ts → ginko.EelR5dt9.d.ts} +50 -5
- package/dist/shared/ginko.ULKQnAWd.d.ts +91 -0
- package/dist/shared/ginko.loGIxGZg.d.mts +91 -0
- package/dist/shared/ginko.o1yIKlgj.d.mts +128 -0
- package/dist/shared/ginko.plW4dLmm.d.mts +1622 -0
- package/dist/shared/{ginko.Dht0xxE5.mjs → ginko.raCzOPYC.mjs} +1 -2
- package/dist/shared/ginko.yKMIjJ68.mjs +84 -0
- package/dist/vue.d.mts +5 -4
- package/dist/vue.d.ts +5 -4
- package/dist/vue.mjs +1 -1
- package/i18n/ar.json +212 -0
- package/i18n/de.json +9 -1
- package/i18n/en.json +9 -1
- package/i18n/es.json +12 -4
- package/i18n/fr.json +212 -0
- package/i18n/it.json +212 -0
- package/package.json +7 -3
- package/dist/shared/ginko.BTUfZCfa.d.mts +0 -172
- package/dist/shared/ginko.C-QjDn3O.mjs +0 -4944
- package/dist/shared/ginko.Dc0oNcDv.d.ts +0 -172
- package/dist/shared/ginko.Mn30dmlm.mjs +0 -20
|
@@ -0,0 +1,1622 @@
|
|
|
1
|
+
import { d as BrickSource, c as Label, f as CollectionBrick, i as TextField, D as DateField, T as Task, M as MarkdownTree, L as Locale, j as SlugField, k as DateRangeField, l as TimeField, m as MarkdownField, n as MoneyField, I as ImageField, o as BooleanField, p as Field, q as RefField, r as ChoiceField, F as Fields, s as Holiday, H as HolidaysOption, t as HolidayCalendar, u as StoredHolidays, v as ListField, h as SingleBrick, N as NumberField } from './ginko.DrkUeYFP.mjs';
|
|
2
|
+
import { R as RouteTemplate } from './ginko.DvPtlHIz.mjs';
|
|
3
|
+
|
|
4
|
+
/** Options every basics factory takes. */
|
|
5
|
+
interface BasicsOptions {
|
|
6
|
+
/** Where the content comes from: absent means the Ginko platform (the owner edits it), `'files'` means files in `content/`. */
|
|
7
|
+
source?: BrickSource;
|
|
8
|
+
/** Replaces the brick's label in the Studio: a text, or one text per language. */
|
|
9
|
+
label?: Label;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** An amount in minor units; `currency` (ISO 4217) defaults to the site's. */
|
|
13
|
+
interface Money {
|
|
14
|
+
amount: number;
|
|
15
|
+
currency?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Street, postal code and city as the owner typed them. The postal code is left out of the output when not given. */
|
|
18
|
+
interface PostalAddressInput {
|
|
19
|
+
street: string;
|
|
20
|
+
postalCode?: string;
|
|
21
|
+
city: string;
|
|
22
|
+
/** ISO country code such as AT or SG. Default: the site's `country`; left out when neither is given. */
|
|
23
|
+
country?: string;
|
|
24
|
+
}
|
|
25
|
+
declare function postalAddress(a: PostalAddressInput, siteCountry?: string): {
|
|
26
|
+
addressCountry?: string | undefined;
|
|
27
|
+
addressLocality: string;
|
|
28
|
+
postalCode?: string | undefined;
|
|
29
|
+
'@type': string;
|
|
30
|
+
streetAddress: string;
|
|
31
|
+
};
|
|
32
|
+
/** schema.org `price` and `priceCurrency`: the amount in major units of its currency (2 decimals for EUR, 0 for JPY). */
|
|
33
|
+
declare function offerPrice(m: Money, siteCurrency: string | undefined): {
|
|
34
|
+
price: string;
|
|
35
|
+
priceCurrency: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* schema.org Offer for a price of the site's own JSON-LD (a service, a product): `price` and `priceCurrency` as
|
|
39
|
+
* `offerPrice`. `valueAddedTaxIncluded` (false for net prices) adds a PriceSpecification that says so, so search
|
|
40
|
+
* engines do not read a net price as the full one; left out, the Offer says nothing about VAT. `unitCode` (UN/CEFACT:
|
|
41
|
+
* `MON` per month, `ANN` per year) makes it a recurring price: a UnitPriceSpecification for one such unit, so a
|
|
42
|
+
* subscription's price per month is not read as a one-off price.
|
|
43
|
+
*/
|
|
44
|
+
declare function offerJsonLd(m: Money, siteCurrency: string | undefined, o?: {
|
|
45
|
+
valueAddedTaxIncluded?: boolean;
|
|
46
|
+
unitCode?: 'MON' | 'ANN' | (string & {});
|
|
47
|
+
}): {
|
|
48
|
+
priceSpecification?: {
|
|
49
|
+
referenceQuantity: {
|
|
50
|
+
'@type': string;
|
|
51
|
+
value: number;
|
|
52
|
+
unitCode: "MON" | "ANN" | (string & {});
|
|
53
|
+
};
|
|
54
|
+
valueAddedTaxIncluded?: undefined;
|
|
55
|
+
price: string;
|
|
56
|
+
priceCurrency: string;
|
|
57
|
+
'@type': string;
|
|
58
|
+
} | {
|
|
59
|
+
referenceQuantity: {
|
|
60
|
+
'@type': string;
|
|
61
|
+
value: number;
|
|
62
|
+
unitCode: "MON" | "ANN" | (string & {});
|
|
63
|
+
};
|
|
64
|
+
valueAddedTaxIncluded: boolean;
|
|
65
|
+
price: string;
|
|
66
|
+
priceCurrency: string;
|
|
67
|
+
'@type': string;
|
|
68
|
+
} | {
|
|
69
|
+
valueAddedTaxIncluded?: undefined;
|
|
70
|
+
price: string;
|
|
71
|
+
priceCurrency: string;
|
|
72
|
+
'@type': string;
|
|
73
|
+
} | {
|
|
74
|
+
valueAddedTaxIncluded: boolean;
|
|
75
|
+
price: string;
|
|
76
|
+
priceCurrency: string;
|
|
77
|
+
'@type': string;
|
|
78
|
+
} | undefined;
|
|
79
|
+
price: string;
|
|
80
|
+
priceCurrency: string;
|
|
81
|
+
'@type': string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
declare const noticeFields: () => {
|
|
85
|
+
text: TextField & {
|
|
86
|
+
readonly max: 140;
|
|
87
|
+
};
|
|
88
|
+
until: DateField & {
|
|
89
|
+
readonly optional: true;
|
|
90
|
+
readonly hint: {
|
|
91
|
+
de: string;
|
|
92
|
+
en: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
/** A task of the notices brick; a preset adds its own quick tasks first (the gastro preset: "Fully booked today"). */
|
|
97
|
+
type NoticeTask = Task<ReturnType<typeof noticeFields>>;
|
|
98
|
+
/** @internal The notices with a preset's tasks before the standard ones; sites use `notices()`. */
|
|
99
|
+
declare function noticesBrick(opts: BasicsOptions, first: readonly NoticeTask[]): CollectionBrick<{
|
|
100
|
+
text: TextField & {
|
|
101
|
+
readonly max: 140;
|
|
102
|
+
};
|
|
103
|
+
until: DateField & {
|
|
104
|
+
readonly optional: true;
|
|
105
|
+
readonly hint: {
|
|
106
|
+
de: string;
|
|
107
|
+
en: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}, undefined>;
|
|
111
|
+
/** At most 5 notices in the owner's order; a notice with `until` leaves the site after that day and is then deleted. */
|
|
112
|
+
declare function notices(opts?: BasicsOptions): CollectionBrick<{
|
|
113
|
+
text: TextField & {
|
|
114
|
+
readonly max: 140;
|
|
115
|
+
};
|
|
116
|
+
until: DateField & {
|
|
117
|
+
readonly optional: true;
|
|
118
|
+
readonly hint: {
|
|
119
|
+
de: string;
|
|
120
|
+
en: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
}, undefined>;
|
|
124
|
+
|
|
125
|
+
/** Options of `events()`: the detail page per locale. Without `route` the events have no pages (no links, no
|
|
126
|
+
* sitemap entries); a site can still list them, and the Studio's Today page still shows the next one. */
|
|
127
|
+
interface EventsOptions extends BasicsOptions {
|
|
128
|
+
route?: Record<Locale, RouteTemplate>;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @internal The events collection with a preset's booking label and the fields it adds after `start`; sites use
|
|
132
|
+
* `events()`. The gastro preset adds none, so its stored schema stays as it was.
|
|
133
|
+
*/
|
|
134
|
+
declare function eventsBrick<const E extends Fields, const B extends Fields = Record<never, never>>(opts: EventsOptions, booking: Label, extra: E, afterBooking?: B): CollectionBrick<{
|
|
135
|
+
title: TextField & {
|
|
136
|
+
readonly max: 120;
|
|
137
|
+
};
|
|
138
|
+
slug: SlugField & {
|
|
139
|
+
readonly from: "title";
|
|
140
|
+
};
|
|
141
|
+
when: DateRangeField;
|
|
142
|
+
start: TimeField & {
|
|
143
|
+
readonly optional: true;
|
|
144
|
+
};
|
|
145
|
+
} & E & {
|
|
146
|
+
description: MarkdownField & {
|
|
147
|
+
readonly profile: "basic";
|
|
148
|
+
readonly max: 5000;
|
|
149
|
+
};
|
|
150
|
+
price: MoneyField & {
|
|
151
|
+
readonly optional: true;
|
|
152
|
+
};
|
|
153
|
+
booking: TextField & {
|
|
154
|
+
readonly format: "url";
|
|
155
|
+
readonly optional: true;
|
|
156
|
+
};
|
|
157
|
+
} & B & {
|
|
158
|
+
image: ImageField & {
|
|
159
|
+
readonly optional: true;
|
|
160
|
+
};
|
|
161
|
+
soldOut: BooleanField & {
|
|
162
|
+
readonly optional: true;
|
|
163
|
+
};
|
|
164
|
+
}, Record<string, `/${string}[slug]${string}`>>;
|
|
165
|
+
/**
|
|
166
|
+
* Events with a detail page: dates, start and end time (site time zone), a place and/or an online address, price,
|
|
167
|
+
* booking link and "fully booked". An event leaves the site after its last day.
|
|
168
|
+
*/
|
|
169
|
+
declare function events(opts: EventsOptions): CollectionBrick<{
|
|
170
|
+
title: TextField & {
|
|
171
|
+
readonly max: 120;
|
|
172
|
+
};
|
|
173
|
+
slug: SlugField & {
|
|
174
|
+
readonly from: "title";
|
|
175
|
+
};
|
|
176
|
+
when: DateRangeField;
|
|
177
|
+
start: TimeField & {
|
|
178
|
+
readonly optional: true;
|
|
179
|
+
};
|
|
180
|
+
} & {
|
|
181
|
+
readonly end: TimeField & {
|
|
182
|
+
readonly optional: true;
|
|
183
|
+
};
|
|
184
|
+
readonly location: TextField & {
|
|
185
|
+
readonly max: 200;
|
|
186
|
+
readonly optional: true;
|
|
187
|
+
};
|
|
188
|
+
readonly online: TextField & {
|
|
189
|
+
readonly format: "url";
|
|
190
|
+
readonly optional: true;
|
|
191
|
+
};
|
|
192
|
+
} & {
|
|
193
|
+
description: MarkdownField & {
|
|
194
|
+
readonly profile: "basic";
|
|
195
|
+
readonly max: 5000;
|
|
196
|
+
};
|
|
197
|
+
price: MoneyField & {
|
|
198
|
+
readonly optional: true;
|
|
199
|
+
};
|
|
200
|
+
booking: TextField & {
|
|
201
|
+
readonly format: "url";
|
|
202
|
+
readonly optional: true;
|
|
203
|
+
};
|
|
204
|
+
} & {
|
|
205
|
+
readonly bookingUntil: DateField & {
|
|
206
|
+
readonly optional: true;
|
|
207
|
+
readonly hint: {
|
|
208
|
+
de: string;
|
|
209
|
+
en: string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
} & {
|
|
213
|
+
image: ImageField & {
|
|
214
|
+
readonly optional: true;
|
|
215
|
+
};
|
|
216
|
+
soldOut: BooleanField & {
|
|
217
|
+
readonly optional: true;
|
|
218
|
+
};
|
|
219
|
+
}, Record<string, `/${string}[slug]${string}`>>;
|
|
220
|
+
/** A session's state: it takes place, it is fully booked, or it is cancelled. */
|
|
221
|
+
type SessionStatus = 'open' | 'soldOut' | 'cancelled';
|
|
222
|
+
declare function sessionsBrick<S extends Field>(opts: BasicsOptions & {
|
|
223
|
+
events?: string;
|
|
224
|
+
}, speakers: S): CollectionBrick<{
|
|
225
|
+
readonly event: RefField & {
|
|
226
|
+
multiple?: false;
|
|
227
|
+
} & {
|
|
228
|
+
readonly to: string;
|
|
229
|
+
};
|
|
230
|
+
readonly date: DateField & Omit<DateField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
231
|
+
default?: string | undefined;
|
|
232
|
+
};
|
|
233
|
+
readonly from: TimeField & Omit<TimeField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
234
|
+
default?: string | undefined;
|
|
235
|
+
};
|
|
236
|
+
readonly to: TimeField & {
|
|
237
|
+
readonly after: "from";
|
|
238
|
+
};
|
|
239
|
+
readonly title: TextField & {
|
|
240
|
+
readonly max: 120;
|
|
241
|
+
};
|
|
242
|
+
readonly summary: TextField & {
|
|
243
|
+
readonly max: 200;
|
|
244
|
+
readonly optional: true;
|
|
245
|
+
};
|
|
246
|
+
readonly room: TextField & {
|
|
247
|
+
readonly max: 80;
|
|
248
|
+
readonly optional: true;
|
|
249
|
+
};
|
|
250
|
+
readonly speakers: S;
|
|
251
|
+
readonly status: ChoiceField<"soldOut" | "open" | "cancelled"> & Omit<{
|
|
252
|
+
readonly options: readonly [{
|
|
253
|
+
readonly value: "open";
|
|
254
|
+
readonly label: {
|
|
255
|
+
de: string;
|
|
256
|
+
en: string;
|
|
257
|
+
};
|
|
258
|
+
}, {
|
|
259
|
+
readonly value: "soldOut";
|
|
260
|
+
readonly label: {
|
|
261
|
+
de: string;
|
|
262
|
+
en: string;
|
|
263
|
+
};
|
|
264
|
+
}, {
|
|
265
|
+
readonly value: "cancelled";
|
|
266
|
+
readonly label: {
|
|
267
|
+
de: string;
|
|
268
|
+
en: string;
|
|
269
|
+
};
|
|
270
|
+
}];
|
|
271
|
+
readonly default: "open";
|
|
272
|
+
}, "options">;
|
|
273
|
+
}, undefined>;
|
|
274
|
+
/**
|
|
275
|
+
* The programme of events: one entry per session, with its event (`events`: the key of the events brick, default
|
|
276
|
+
* `events`), date, start and end time (site time zone; the end after the start), room, speakers and status. Speakers
|
|
277
|
+
* are entries of the people collection named by `people`, or a text without it. A session leaves the site after its day.
|
|
278
|
+
* The bundle orders sessions by date only: a page that lists them (a programme, "now" and "next") sorts them with
|
|
279
|
+
* `sessionsInOrder`.
|
|
280
|
+
*/
|
|
281
|
+
declare function sessions(opts: BasicsOptions & {
|
|
282
|
+
events?: string;
|
|
283
|
+
people: string;
|
|
284
|
+
}): ReturnType<typeof sessionsBrick<ReturnType<typeof speakerRefs>>>;
|
|
285
|
+
declare function sessions(opts?: BasicsOptions & {
|
|
286
|
+
events?: string;
|
|
287
|
+
people?: undefined;
|
|
288
|
+
}): ReturnType<typeof sessionsBrick<ReturnType<typeof speakerText>>>;
|
|
289
|
+
declare const speakerRefs: (people: string) => RefField & {
|
|
290
|
+
multiple: true;
|
|
291
|
+
} & {
|
|
292
|
+
readonly to: string;
|
|
293
|
+
readonly max: 10;
|
|
294
|
+
readonly optional: true;
|
|
295
|
+
};
|
|
296
|
+
declare const speakerText: () => TextField & {
|
|
297
|
+
readonly max: 200;
|
|
298
|
+
readonly optional: true;
|
|
299
|
+
};
|
|
300
|
+
/** Sessions by date, then start time, then title: the order of a programme. */
|
|
301
|
+
declare function sessionsInOrder<S extends {
|
|
302
|
+
data: {
|
|
303
|
+
date: string;
|
|
304
|
+
from: string;
|
|
305
|
+
title?: unknown;
|
|
306
|
+
};
|
|
307
|
+
}>(items: readonly S[]): S[];
|
|
308
|
+
/** One session for `eventJsonLd`. */
|
|
309
|
+
interface SessionJsonLdInput {
|
|
310
|
+
title: string;
|
|
311
|
+
date: string;
|
|
312
|
+
from: string;
|
|
313
|
+
to: string;
|
|
314
|
+
room?: string;
|
|
315
|
+
/** Names of the speakers. */
|
|
316
|
+
speakers?: string[];
|
|
317
|
+
status?: SessionStatus;
|
|
318
|
+
}
|
|
319
|
+
interface EventJsonLdInput {
|
|
320
|
+
title: string;
|
|
321
|
+
/** Absolute URL of the event page. */
|
|
322
|
+
url: string;
|
|
323
|
+
/** The days of the event (YYYY-MM-DD). */
|
|
324
|
+
when: {
|
|
325
|
+
from: string;
|
|
326
|
+
to: string;
|
|
327
|
+
};
|
|
328
|
+
/** Start time of the first day (`HH:MM`, site time zone). */
|
|
329
|
+
start?: string;
|
|
330
|
+
/** End time of the last day (`HH:MM`, site time zone). */
|
|
331
|
+
end?: string;
|
|
332
|
+
/** The site's IANA time zone: times are written with its offset on that day (`+01:00` in winter in Vienna). */
|
|
333
|
+
timeZone: string;
|
|
334
|
+
/** Where it takes place. With `online` too, the event is mixed. */
|
|
335
|
+
location?: {
|
|
336
|
+
name: string;
|
|
337
|
+
address?: PostalAddressInput;
|
|
338
|
+
};
|
|
339
|
+
/** Address where people join online. */
|
|
340
|
+
online?: string;
|
|
341
|
+
/** The site's country, the address's country when it has none. */
|
|
342
|
+
country?: string;
|
|
343
|
+
description?: MarkdownTree;
|
|
344
|
+
/** Absolute URL of the image. */
|
|
345
|
+
image?: string;
|
|
346
|
+
price?: Money;
|
|
347
|
+
/** The site’s currency (ISO 4217), used for a price that carries none. There is no default. */
|
|
348
|
+
currency?: string;
|
|
349
|
+
/** Absolute URL where visitors book. Left out when the event is fully booked. */
|
|
350
|
+
booking?: string;
|
|
351
|
+
/** Fully booked: the offer says `SoldOut` and has no booking link. */
|
|
352
|
+
soldOut?: boolean;
|
|
353
|
+
/** The programme: each session becomes a `subEvent`. */
|
|
354
|
+
sessions?: SessionJsonLdInput[];
|
|
355
|
+
}
|
|
356
|
+
/** schema.org Event for one event. Offers are given with a price, or to say it is fully booked. */
|
|
357
|
+
declare function eventJsonLd(input: EventJsonLdInput): Record<string, unknown>;
|
|
358
|
+
|
|
359
|
+
declare const weekdayKeys: readonly ["mo", "tu", "we", "th", "fr", "sa", "su"];
|
|
360
|
+
type Weekday = (typeof weekdayKeys)[number];
|
|
361
|
+
/** Weekday key of a YYYY-MM-DD date. */
|
|
362
|
+
declare function weekdayOf(date: string): Weekday;
|
|
363
|
+
|
|
364
|
+
interface HolidayNames {
|
|
365
|
+
de: string;
|
|
366
|
+
en: string;
|
|
367
|
+
}
|
|
368
|
+
declare function austrianHolidays(year: number): Holiday[];
|
|
369
|
+
/**
|
|
370
|
+
* German nationwide public holidays only (9 days). Regional ones are NOT included: Heilige Drei Könige,
|
|
371
|
+
* Fronleichnam, Mariä Himmelfahrt, Reformationstag, Allerheiligen, Buß- und Bettag, Frauentag and others.
|
|
372
|
+
* Pass your own calendar function as `calendar` when the state has more.
|
|
373
|
+
*/
|
|
374
|
+
declare function germanHolidays(year: number): Holiday[];
|
|
375
|
+
declare function singaporeHolidays(year: number): Holiday[];
|
|
376
|
+
/** The calendar function for a name or a custom function. */
|
|
377
|
+
declare function calendarOf(option: HolidaysOption): HolidayCalendar;
|
|
378
|
+
|
|
379
|
+
interface Times {
|
|
380
|
+
from1?: string;
|
|
381
|
+
to1?: string;
|
|
382
|
+
from2?: string;
|
|
383
|
+
to2?: string;
|
|
384
|
+
}
|
|
385
|
+
interface DayHours extends Times {
|
|
386
|
+
day: string;
|
|
387
|
+
closed: boolean;
|
|
388
|
+
}
|
|
389
|
+
/** An exception without times is a closure; with times and `closed: false` it is special hours. */
|
|
390
|
+
interface Exception extends Times {
|
|
391
|
+
_id: string;
|
|
392
|
+
when: {
|
|
393
|
+
from: string;
|
|
394
|
+
to: string;
|
|
395
|
+
};
|
|
396
|
+
reason: string;
|
|
397
|
+
closed: boolean;
|
|
398
|
+
}
|
|
399
|
+
/** A public holiday on which the house is closed, listed with the closures (see `upcomingClosures`). Guests read its name in their language from `holiday`. */
|
|
400
|
+
interface HolidayClosure {
|
|
401
|
+
_id: string;
|
|
402
|
+
when: {
|
|
403
|
+
from: string;
|
|
404
|
+
to: string;
|
|
405
|
+
};
|
|
406
|
+
closed: true;
|
|
407
|
+
holiday: HolidayNames;
|
|
408
|
+
}
|
|
409
|
+
/** A date range with its own week: a season ("yearly") or "new hours from a date". */
|
|
410
|
+
interface HourPlan {
|
|
411
|
+
_id?: string;
|
|
412
|
+
id?: string;
|
|
413
|
+
label?: string;
|
|
414
|
+
from: string;
|
|
415
|
+
to?: string;
|
|
416
|
+
yearly?: boolean;
|
|
417
|
+
week: DayHours[];
|
|
418
|
+
}
|
|
419
|
+
type HolidaySetting = 'sunday' | 'closed' | 'normal';
|
|
420
|
+
interface HoursData {
|
|
421
|
+
week: DayHours[];
|
|
422
|
+
exceptions: Exception[];
|
|
423
|
+
closedOn?: string;
|
|
424
|
+
closedNote?: string;
|
|
425
|
+
holidays?: HolidaySetting;
|
|
426
|
+
}
|
|
427
|
+
interface Span {
|
|
428
|
+
from: string;
|
|
429
|
+
to: string;
|
|
430
|
+
}
|
|
431
|
+
declare function spansOf(t: Times): Span[];
|
|
432
|
+
declare function spansText(spans: Span[], and: string): string;
|
|
433
|
+
/** The opening times of one weekday as text: `11:30–14:00 and 17:30–22:00` with `and` = "and". Empty when closed. */
|
|
434
|
+
declare function timesOf(day: DayHours | undefined, and: string): string;
|
|
435
|
+
/** The public holiday on `date` in `calendar`. */
|
|
436
|
+
declare function holidayOn(date: string, calendar: HolidaysOption): Holiday | undefined;
|
|
437
|
+
type HoursSource = 'today' | 'exception' | 'holiday' | 'plan' | 'week';
|
|
438
|
+
interface DayRule {
|
|
439
|
+
closed: boolean;
|
|
440
|
+
times: Span[];
|
|
441
|
+
/** The owner's text: the "closed today" note or the exception's reason. */
|
|
442
|
+
reason?: string;
|
|
443
|
+
source: HoursSource;
|
|
444
|
+
/** Bundle path of the reason's text, so the page can set its language (closedNote, exception reason). */
|
|
445
|
+
field?: string;
|
|
446
|
+
/** Set when a public holiday decided the result: its name in German and English. */
|
|
447
|
+
holiday?: HolidayNames;
|
|
448
|
+
}
|
|
449
|
+
interface HoursContext {
|
|
450
|
+
hours: HoursData;
|
|
451
|
+
plans?: HourPlan[];
|
|
452
|
+
/** Which public holidays count. Code-level config of the site, not an owner setting; wins over `country`. */
|
|
453
|
+
calendar?: HolidaysOption;
|
|
454
|
+
/**
|
|
455
|
+
* The site's country (`useRuntimeConfig().public.ginko.country`): its calendar counts when `calendar` is not given.
|
|
456
|
+
* Neither given (or a country without a calendar): no public holidays.
|
|
457
|
+
*/
|
|
458
|
+
country?: string;
|
|
459
|
+
}
|
|
460
|
+
/** The calendar of a context: `calendar`, else the one of `country`, else none. */
|
|
461
|
+
declare function calendarIn(ctx: Pick<HoursContext, 'calendar' | 'country'>): HolidaysOption;
|
|
462
|
+
/** The plan that applies on `date`: the one with the latest `from` wins. */
|
|
463
|
+
declare function planOn(plans: HourPlan[] | undefined, date: string): HourPlan | undefined;
|
|
464
|
+
/** The 7-day plan that applies on `date`: a covering plan, else the standard week. */
|
|
465
|
+
declare function weekFor(ctx: HoursContext, date: string): {
|
|
466
|
+
week: DayHours[];
|
|
467
|
+
plan?: HourPlan;
|
|
468
|
+
};
|
|
469
|
+
/**
|
|
470
|
+
* What applies on `date`. Order: the owner's "closed today" switch, an exception that covers the
|
|
471
|
+
* date (closed, or its own times), a public holiday (by the holiday setting), a plan that covers
|
|
472
|
+
* the date, the standard week.
|
|
473
|
+
*/
|
|
474
|
+
declare function hoursOn(ctx: HoursContext, date: string): DayRule;
|
|
475
|
+
/** The 7 days from `monday`, each with what applies. */
|
|
476
|
+
declare function weekOf(ctx: HoursContext, monday: string): Array<DayRule & {
|
|
477
|
+
date: string;
|
|
478
|
+
weekday: Weekday;
|
|
479
|
+
}>;
|
|
480
|
+
/**
|
|
481
|
+
* `times` are the opening spans; join them with `spansText(times, and)` in the page's language. `field` is the bundle
|
|
482
|
+
* path of the owner's reason, for its language (closedNote or an exception's reason).
|
|
483
|
+
*/
|
|
484
|
+
type TodayState = {
|
|
485
|
+
kind: 'open';
|
|
486
|
+
times: Span[];
|
|
487
|
+
reason?: string;
|
|
488
|
+
field?: string;
|
|
489
|
+
} | {
|
|
490
|
+
kind: 'closed';
|
|
491
|
+
reason?: string;
|
|
492
|
+
field: string;
|
|
493
|
+
}
|
|
494
|
+
/** Closed for a public holiday; `holiday` has its name in German and English. */
|
|
495
|
+
| {
|
|
496
|
+
kind: 'holiday';
|
|
497
|
+
holiday: HolidayNames;
|
|
498
|
+
} | {
|
|
499
|
+
kind: 'restDay';
|
|
500
|
+
};
|
|
501
|
+
/** Whether the house is open on `today`, by `hoursOn`. */
|
|
502
|
+
declare function todayState(ctx: HoursContext, today: string): TodayState;
|
|
503
|
+
/**
|
|
504
|
+
* The notices to show on `today`. A notice that ends today (`until` is today) is about today, so a closure today wins
|
|
505
|
+
* over it: on a day the owner closed ("Heute geschlossen" or a closing exception), such a notice ("Heute sind wir
|
|
506
|
+
* ausgebucht.") is left out. Rest days and public holidays do not hide notices, and notices that end later stay.
|
|
507
|
+
*/
|
|
508
|
+
declare function noticesOn<N extends {
|
|
509
|
+
data: {
|
|
510
|
+
until?: string | null;
|
|
511
|
+
};
|
|
512
|
+
}>(notices: readonly N[], ctx: HoursContext, today: string): N[];
|
|
513
|
+
/**
|
|
514
|
+
* Public holidays on which the house is closed, starting after `today` and within `days` days. A holiday on a day the
|
|
515
|
+
* week (or the running plan) closes anyway is left out: it closes nothing the visitor could have come on.
|
|
516
|
+
*/
|
|
517
|
+
declare function upcomingHolidayClosures(ctx: HoursContext, today: string, days: number): HolidayClosure[];
|
|
518
|
+
/**
|
|
519
|
+
* The day set in "closed on" (`closedOn`) as a closure, when it is after `today`: `_id` `'closedOn'`, its note as
|
|
520
|
+
* `reason`, `field` `'closedNote'`. A closure today is today's state (`todayState`); a past day no longer counts.
|
|
521
|
+
*/
|
|
522
|
+
declare function closedOnClosure(hours: Pick<HoursData, 'closedOn' | 'closedNote'>, today: string): (Exception & {
|
|
523
|
+
field: string;
|
|
524
|
+
}) | undefined;
|
|
525
|
+
/**
|
|
526
|
+
* Closures that start after `today` and within `days` days: the owner's closing exceptions, the day set in "closed
|
|
527
|
+
* on" (`closedOnClosure`), and the public holidays that close the house (by `calendarIn(ctx)`). A holiday entry has
|
|
528
|
+
* `holiday` instead of `reason`. An owner's closure has `field`, the bundle path of its reason, so the page can set the
|
|
529
|
+
* reason's language.
|
|
530
|
+
*/
|
|
531
|
+
declare function upcomingClosures(ctx: HoursContext, today: string, days: number): Array<(Exception & {
|
|
532
|
+
field: string;
|
|
533
|
+
}) | HolidayClosure>;
|
|
534
|
+
/**
|
|
535
|
+
* Plans that start after `today` and within `days` days, with their start date (yearly: next occurrence) and, when the
|
|
536
|
+
* plan has an end, its last day `ends` (yearly: the end of that occurrence).
|
|
537
|
+
*/
|
|
538
|
+
declare function upcomingPlans(plans: HourPlan[], today: string, days: number): Array<{
|
|
539
|
+
plan: HourPlan;
|
|
540
|
+
starts: string;
|
|
541
|
+
ends?: string;
|
|
542
|
+
}>;
|
|
543
|
+
/**
|
|
544
|
+
* Today's line of the hours (the Studio's status, SPEC templates 7.1): the opening ranges, closed (with the owner's
|
|
545
|
+
* text in `reason`, or the public holiday in `holiday`), or unknown. Unknown: the data is not hours (no week row for
|
|
546
|
+
* today), an open day has no times, a site calendar in code (`holidays: 'custom'`) could decide the day and only the
|
|
547
|
+
* site can run it, or the schema stores no calendar and today is an Austrian public holiday (see `HoursLineContext`).
|
|
548
|
+
* `calendar`: the hours of today are entered and only a holiday calendar the line cannot run is in the way, so nothing
|
|
549
|
+
* is missing for the owner to enter.
|
|
550
|
+
*/
|
|
551
|
+
type HoursLine = {
|
|
552
|
+
state: 'open';
|
|
553
|
+
ranges: Array<[from: string, to: string]>;
|
|
554
|
+
} | {
|
|
555
|
+
state: 'closed';
|
|
556
|
+
reason?: string | Record<string, string>;
|
|
557
|
+
holiday?: HolidayNames;
|
|
558
|
+
} | {
|
|
559
|
+
state: 'unknown';
|
|
560
|
+
calendar?: true;
|
|
561
|
+
};
|
|
562
|
+
interface HoursLineContext {
|
|
563
|
+
/** The site's IANA time zone: "today" is the date there. */
|
|
564
|
+
timeZone: string;
|
|
565
|
+
/** Default: the current time. */
|
|
566
|
+
now?: Date;
|
|
567
|
+
/** Entries of the hour plans (`hourPlans()`), if the site has them. */
|
|
568
|
+
plans?: HourPlan[];
|
|
569
|
+
/**
|
|
570
|
+
* `schema.holidays`. Absent: a schema released before `country` existed. Its site may close on Austrian holidays
|
|
571
|
+
* (the gastro preset's 0.4 default) or on none (the neutral basics), and the schema cannot tell which; on a day where
|
|
572
|
+
* the two differ the line is unknown rather than wrong.
|
|
573
|
+
*/
|
|
574
|
+
holidays?: StoredHolidays;
|
|
575
|
+
}
|
|
576
|
+
/** `hours` (the single of `hours()`) today in the site's time zone; see `HoursLine`. */
|
|
577
|
+
declare function hoursLine(data: unknown, ctx: HoursLineContext): HoursLine;
|
|
578
|
+
|
|
579
|
+
/** Options of `hours()`. */
|
|
580
|
+
interface HoursOptions extends BasicsOptions {
|
|
581
|
+
/**
|
|
582
|
+
* The key of the site's hour plans (`hourPlans()`), for example `'hourPlans'`. The Studio's line for today then follows
|
|
583
|
+
* the plan that applies today. The release check refuses a key that is not a collection of hour plans.
|
|
584
|
+
*/
|
|
585
|
+
plans?: string;
|
|
586
|
+
}
|
|
587
|
+
declare const weekdays: readonly [{
|
|
588
|
+
readonly value: "mo";
|
|
589
|
+
readonly label: {
|
|
590
|
+
de: string;
|
|
591
|
+
en: string;
|
|
592
|
+
};
|
|
593
|
+
}, {
|
|
594
|
+
readonly value: "tu";
|
|
595
|
+
readonly label: {
|
|
596
|
+
de: string;
|
|
597
|
+
en: string;
|
|
598
|
+
};
|
|
599
|
+
}, {
|
|
600
|
+
readonly value: "we";
|
|
601
|
+
readonly label: {
|
|
602
|
+
de: string;
|
|
603
|
+
en: string;
|
|
604
|
+
};
|
|
605
|
+
}, {
|
|
606
|
+
readonly value: "th";
|
|
607
|
+
readonly label: {
|
|
608
|
+
de: string;
|
|
609
|
+
en: string;
|
|
610
|
+
};
|
|
611
|
+
}, {
|
|
612
|
+
readonly value: "fr";
|
|
613
|
+
readonly label: {
|
|
614
|
+
de: string;
|
|
615
|
+
en: string;
|
|
616
|
+
};
|
|
617
|
+
}, {
|
|
618
|
+
readonly value: "sa";
|
|
619
|
+
readonly label: {
|
|
620
|
+
de: string;
|
|
621
|
+
en: string;
|
|
622
|
+
};
|
|
623
|
+
}, {
|
|
624
|
+
readonly value: "su";
|
|
625
|
+
readonly label: {
|
|
626
|
+
de: string;
|
|
627
|
+
en: string;
|
|
628
|
+
};
|
|
629
|
+
}];
|
|
630
|
+
/** One row of the default week. Row IDs are fixed so every fresh site starts with the same, stable rows. */
|
|
631
|
+
interface WeekRow {
|
|
632
|
+
_id: string;
|
|
633
|
+
day: (typeof weekdays)[number]['value'];
|
|
634
|
+
closed: boolean;
|
|
635
|
+
from1?: string;
|
|
636
|
+
to1?: string;
|
|
637
|
+
from2?: string;
|
|
638
|
+
to2?: string;
|
|
639
|
+
}
|
|
640
|
+
/** Every text of the two hours bricks. A preset pins its own (the gastro preset keeps its restaurant wording). */
|
|
641
|
+
interface HoursTexts {
|
|
642
|
+
hours: Label;
|
|
643
|
+
week: Label;
|
|
644
|
+
day: Label;
|
|
645
|
+
closed: Label;
|
|
646
|
+
opens: Label;
|
|
647
|
+
closes: Label;
|
|
648
|
+
opensAgain: Label;
|
|
649
|
+
opensAgainHint: Label;
|
|
650
|
+
closesAgain: Label;
|
|
651
|
+
exceptions: Label;
|
|
652
|
+
exception: Label;
|
|
653
|
+
dates: Label;
|
|
654
|
+
reason: Label;
|
|
655
|
+
reasonHint: Label;
|
|
656
|
+
exceptionClosed: Label;
|
|
657
|
+
closedOn: Label;
|
|
658
|
+
closedOnHint: Label;
|
|
659
|
+
closedNote: Label;
|
|
660
|
+
closedNoteHint: Label;
|
|
661
|
+
noticeDays: Label;
|
|
662
|
+
noticeDaysHint: Label;
|
|
663
|
+
holidays: Label;
|
|
664
|
+
holidaySunday: Label;
|
|
665
|
+
holidayClosed: Label;
|
|
666
|
+
holidayNormal: Label;
|
|
667
|
+
holidaysHint: Label;
|
|
668
|
+
closedToday: Label;
|
|
669
|
+
holidaySetting: Label;
|
|
670
|
+
plans: Label;
|
|
671
|
+
planName: Label;
|
|
672
|
+
planFrom: Label;
|
|
673
|
+
planTo: Label;
|
|
674
|
+
yearly: Label;
|
|
675
|
+
planAdd: Label;
|
|
676
|
+
planEdit: Label;
|
|
677
|
+
planRemove: Label;
|
|
678
|
+
}
|
|
679
|
+
/** @internal The hours single with a preset's texts and default week; sites use `hours()`. */
|
|
680
|
+
declare function hoursBrick(t: HoursTexts, week: readonly WeekRow[], opts: HoursOptions): SingleBrick<{
|
|
681
|
+
readonly week: ListField<{
|
|
682
|
+
readonly from1: TimeField & {
|
|
683
|
+
readonly optional: true;
|
|
684
|
+
readonly showWhen: {
|
|
685
|
+
readonly field: "closed";
|
|
686
|
+
readonly not: true;
|
|
687
|
+
};
|
|
688
|
+
};
|
|
689
|
+
readonly to1: TimeField & {
|
|
690
|
+
readonly optional: true;
|
|
691
|
+
readonly showWhen: {
|
|
692
|
+
readonly field: "closed";
|
|
693
|
+
readonly not: true;
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
readonly from2: TimeField & {
|
|
697
|
+
readonly optional: true;
|
|
698
|
+
readonly showWhen: {
|
|
699
|
+
readonly field: "closed";
|
|
700
|
+
readonly not: true;
|
|
701
|
+
};
|
|
702
|
+
readonly hint: Label;
|
|
703
|
+
};
|
|
704
|
+
readonly to2: TimeField & {
|
|
705
|
+
readonly optional: true;
|
|
706
|
+
readonly showWhen: {
|
|
707
|
+
readonly field: "closed";
|
|
708
|
+
readonly not: true;
|
|
709
|
+
};
|
|
710
|
+
};
|
|
711
|
+
readonly day: ChoiceField<"fr" | "th" | "mo" | "tu" | "we" | "sa" | "su"> & Omit<{
|
|
712
|
+
readonly options: readonly [{
|
|
713
|
+
readonly value: "mo";
|
|
714
|
+
readonly label: {
|
|
715
|
+
de: string;
|
|
716
|
+
en: string;
|
|
717
|
+
};
|
|
718
|
+
}, {
|
|
719
|
+
readonly value: "tu";
|
|
720
|
+
readonly label: {
|
|
721
|
+
de: string;
|
|
722
|
+
en: string;
|
|
723
|
+
};
|
|
724
|
+
}, {
|
|
725
|
+
readonly value: "we";
|
|
726
|
+
readonly label: {
|
|
727
|
+
de: string;
|
|
728
|
+
en: string;
|
|
729
|
+
};
|
|
730
|
+
}, {
|
|
731
|
+
readonly value: "th";
|
|
732
|
+
readonly label: {
|
|
733
|
+
de: string;
|
|
734
|
+
en: string;
|
|
735
|
+
};
|
|
736
|
+
}, {
|
|
737
|
+
readonly value: "fr";
|
|
738
|
+
readonly label: {
|
|
739
|
+
de: string;
|
|
740
|
+
en: string;
|
|
741
|
+
};
|
|
742
|
+
}, {
|
|
743
|
+
readonly value: "sa";
|
|
744
|
+
readonly label: {
|
|
745
|
+
de: string;
|
|
746
|
+
en: string;
|
|
747
|
+
};
|
|
748
|
+
}, {
|
|
749
|
+
readonly value: "su";
|
|
750
|
+
readonly label: {
|
|
751
|
+
de: string;
|
|
752
|
+
en: string;
|
|
753
|
+
};
|
|
754
|
+
}];
|
|
755
|
+
}, "options">;
|
|
756
|
+
readonly closed: BooleanField & Omit<BooleanField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
757
|
+
default?: boolean | undefined;
|
|
758
|
+
};
|
|
759
|
+
}> & Omit<{
|
|
760
|
+
readonly itemLabel: Label;
|
|
761
|
+
readonly fields: {
|
|
762
|
+
readonly from1: TimeField & {
|
|
763
|
+
readonly optional: true;
|
|
764
|
+
readonly showWhen: {
|
|
765
|
+
readonly field: "closed";
|
|
766
|
+
readonly not: true;
|
|
767
|
+
};
|
|
768
|
+
};
|
|
769
|
+
readonly to1: TimeField & {
|
|
770
|
+
readonly optional: true;
|
|
771
|
+
readonly showWhen: {
|
|
772
|
+
readonly field: "closed";
|
|
773
|
+
readonly not: true;
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
readonly from2: TimeField & {
|
|
777
|
+
readonly optional: true;
|
|
778
|
+
readonly showWhen: {
|
|
779
|
+
readonly field: "closed";
|
|
780
|
+
readonly not: true;
|
|
781
|
+
};
|
|
782
|
+
readonly hint: Label;
|
|
783
|
+
};
|
|
784
|
+
readonly to2: TimeField & {
|
|
785
|
+
readonly optional: true;
|
|
786
|
+
readonly showWhen: {
|
|
787
|
+
readonly field: "closed";
|
|
788
|
+
readonly not: true;
|
|
789
|
+
};
|
|
790
|
+
};
|
|
791
|
+
readonly day: ChoiceField<"fr" | "th" | "mo" | "tu" | "we" | "sa" | "su"> & Omit<{
|
|
792
|
+
readonly options: readonly [{
|
|
793
|
+
readonly value: "mo";
|
|
794
|
+
readonly label: {
|
|
795
|
+
de: string;
|
|
796
|
+
en: string;
|
|
797
|
+
};
|
|
798
|
+
}, {
|
|
799
|
+
readonly value: "tu";
|
|
800
|
+
readonly label: {
|
|
801
|
+
de: string;
|
|
802
|
+
en: string;
|
|
803
|
+
};
|
|
804
|
+
}, {
|
|
805
|
+
readonly value: "we";
|
|
806
|
+
readonly label: {
|
|
807
|
+
de: string;
|
|
808
|
+
en: string;
|
|
809
|
+
};
|
|
810
|
+
}, {
|
|
811
|
+
readonly value: "th";
|
|
812
|
+
readonly label: {
|
|
813
|
+
de: string;
|
|
814
|
+
en: string;
|
|
815
|
+
};
|
|
816
|
+
}, {
|
|
817
|
+
readonly value: "fr";
|
|
818
|
+
readonly label: {
|
|
819
|
+
de: string;
|
|
820
|
+
en: string;
|
|
821
|
+
};
|
|
822
|
+
}, {
|
|
823
|
+
readonly value: "sa";
|
|
824
|
+
readonly label: {
|
|
825
|
+
de: string;
|
|
826
|
+
en: string;
|
|
827
|
+
};
|
|
828
|
+
}, {
|
|
829
|
+
readonly value: "su";
|
|
830
|
+
readonly label: {
|
|
831
|
+
de: string;
|
|
832
|
+
en: string;
|
|
833
|
+
};
|
|
834
|
+
}];
|
|
835
|
+
}, "options">;
|
|
836
|
+
readonly closed: BooleanField & Omit<BooleanField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
837
|
+
default?: boolean | undefined;
|
|
838
|
+
};
|
|
839
|
+
};
|
|
840
|
+
readonly min: 7;
|
|
841
|
+
readonly max: 7;
|
|
842
|
+
readonly unique: "day";
|
|
843
|
+
readonly default: readonly WeekRow[];
|
|
844
|
+
}, "fields">;
|
|
845
|
+
readonly exceptions: ListField<{
|
|
846
|
+
readonly from1: TimeField & {
|
|
847
|
+
readonly optional: true;
|
|
848
|
+
readonly showWhen: {
|
|
849
|
+
readonly field: "closed";
|
|
850
|
+
readonly not: true;
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
readonly to1: TimeField & {
|
|
854
|
+
readonly optional: true;
|
|
855
|
+
readonly showWhen: {
|
|
856
|
+
readonly field: "closed";
|
|
857
|
+
readonly not: true;
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
readonly from2: TimeField & {
|
|
861
|
+
readonly optional: true;
|
|
862
|
+
readonly showWhen: {
|
|
863
|
+
readonly field: "closed";
|
|
864
|
+
readonly not: true;
|
|
865
|
+
};
|
|
866
|
+
readonly hint: Label;
|
|
867
|
+
};
|
|
868
|
+
readonly to2: TimeField & {
|
|
869
|
+
readonly optional: true;
|
|
870
|
+
readonly showWhen: {
|
|
871
|
+
readonly field: "closed";
|
|
872
|
+
readonly not: true;
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
readonly when: DateRangeField & Omit<DateRangeField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
876
|
+
default?: {
|
|
877
|
+
from: string;
|
|
878
|
+
to: string;
|
|
879
|
+
} | undefined;
|
|
880
|
+
};
|
|
881
|
+
readonly reason: TextField & {
|
|
882
|
+
readonly max: 140;
|
|
883
|
+
readonly hint: Label;
|
|
884
|
+
};
|
|
885
|
+
readonly closed: BooleanField & {
|
|
886
|
+
readonly default: true;
|
|
887
|
+
};
|
|
888
|
+
}> & Omit<{
|
|
889
|
+
readonly itemLabel: Label;
|
|
890
|
+
readonly fields: {
|
|
891
|
+
readonly from1: TimeField & {
|
|
892
|
+
readonly optional: true;
|
|
893
|
+
readonly showWhen: {
|
|
894
|
+
readonly field: "closed";
|
|
895
|
+
readonly not: true;
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
readonly to1: TimeField & {
|
|
899
|
+
readonly optional: true;
|
|
900
|
+
readonly showWhen: {
|
|
901
|
+
readonly field: "closed";
|
|
902
|
+
readonly not: true;
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
readonly from2: TimeField & {
|
|
906
|
+
readonly optional: true;
|
|
907
|
+
readonly showWhen: {
|
|
908
|
+
readonly field: "closed";
|
|
909
|
+
readonly not: true;
|
|
910
|
+
};
|
|
911
|
+
readonly hint: Label;
|
|
912
|
+
};
|
|
913
|
+
readonly to2: TimeField & {
|
|
914
|
+
readonly optional: true;
|
|
915
|
+
readonly showWhen: {
|
|
916
|
+
readonly field: "closed";
|
|
917
|
+
readonly not: true;
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
readonly when: DateRangeField & Omit<DateRangeField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
921
|
+
default?: {
|
|
922
|
+
from: string;
|
|
923
|
+
to: string;
|
|
924
|
+
} | undefined;
|
|
925
|
+
};
|
|
926
|
+
readonly reason: TextField & {
|
|
927
|
+
readonly max: 140;
|
|
928
|
+
readonly hint: Label;
|
|
929
|
+
};
|
|
930
|
+
readonly closed: BooleanField & {
|
|
931
|
+
readonly default: true;
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
readonly max: 20;
|
|
935
|
+
readonly default: readonly [];
|
|
936
|
+
}, "fields">;
|
|
937
|
+
readonly closedOn: DateField & {
|
|
938
|
+
readonly optional: true;
|
|
939
|
+
readonly hint: Label;
|
|
940
|
+
};
|
|
941
|
+
readonly closedNote: TextField & {
|
|
942
|
+
readonly max: 140;
|
|
943
|
+
readonly optional: true;
|
|
944
|
+
readonly hint: Label;
|
|
945
|
+
};
|
|
946
|
+
readonly holidayNoticeDays: NumberField & {
|
|
947
|
+
readonly min: 0;
|
|
948
|
+
readonly max: 60;
|
|
949
|
+
readonly step: 1;
|
|
950
|
+
readonly default: 14;
|
|
951
|
+
readonly hint: Label;
|
|
952
|
+
};
|
|
953
|
+
readonly holidays: ChoiceField<"closed" | "sunday" | "normal"> & Omit<{
|
|
954
|
+
readonly options: readonly [{
|
|
955
|
+
readonly value: "sunday";
|
|
956
|
+
readonly label: Label;
|
|
957
|
+
}, {
|
|
958
|
+
readonly value: "closed";
|
|
959
|
+
readonly label: Label;
|
|
960
|
+
}, {
|
|
961
|
+
readonly value: "normal";
|
|
962
|
+
readonly label: Label;
|
|
963
|
+
}];
|
|
964
|
+
readonly optional: true;
|
|
965
|
+
readonly default: "sunday";
|
|
966
|
+
readonly hint: Label;
|
|
967
|
+
}, "options">;
|
|
968
|
+
}>;
|
|
969
|
+
/** @internal The hour plans with a preset's texts; sites use `hourPlans()`. */
|
|
970
|
+
declare function hourPlansBrick(t: HoursTexts, week: readonly WeekRow[], opts: BasicsOptions): CollectionBrick<{
|
|
971
|
+
readonly label: TextField & {
|
|
972
|
+
readonly max: 80;
|
|
973
|
+
};
|
|
974
|
+
readonly from: DateField & Omit<DateField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
975
|
+
default?: string | undefined;
|
|
976
|
+
};
|
|
977
|
+
readonly to: DateField & {
|
|
978
|
+
readonly optional: true;
|
|
979
|
+
};
|
|
980
|
+
readonly yearly: BooleanField & {
|
|
981
|
+
readonly default: false;
|
|
982
|
+
};
|
|
983
|
+
readonly week: ListField<{
|
|
984
|
+
readonly from1: TimeField & {
|
|
985
|
+
readonly optional: true;
|
|
986
|
+
readonly showWhen: {
|
|
987
|
+
readonly field: "closed";
|
|
988
|
+
readonly not: true;
|
|
989
|
+
};
|
|
990
|
+
};
|
|
991
|
+
readonly to1: TimeField & {
|
|
992
|
+
readonly optional: true;
|
|
993
|
+
readonly showWhen: {
|
|
994
|
+
readonly field: "closed";
|
|
995
|
+
readonly not: true;
|
|
996
|
+
};
|
|
997
|
+
};
|
|
998
|
+
readonly from2: TimeField & {
|
|
999
|
+
readonly optional: true;
|
|
1000
|
+
readonly showWhen: {
|
|
1001
|
+
readonly field: "closed";
|
|
1002
|
+
readonly not: true;
|
|
1003
|
+
};
|
|
1004
|
+
readonly hint: Label;
|
|
1005
|
+
};
|
|
1006
|
+
readonly to2: TimeField & {
|
|
1007
|
+
readonly optional: true;
|
|
1008
|
+
readonly showWhen: {
|
|
1009
|
+
readonly field: "closed";
|
|
1010
|
+
readonly not: true;
|
|
1011
|
+
};
|
|
1012
|
+
};
|
|
1013
|
+
readonly day: ChoiceField<"fr" | "th" | "mo" | "tu" | "we" | "sa" | "su"> & Omit<{
|
|
1014
|
+
readonly options: readonly [{
|
|
1015
|
+
readonly value: "mo";
|
|
1016
|
+
readonly label: {
|
|
1017
|
+
de: string;
|
|
1018
|
+
en: string;
|
|
1019
|
+
};
|
|
1020
|
+
}, {
|
|
1021
|
+
readonly value: "tu";
|
|
1022
|
+
readonly label: {
|
|
1023
|
+
de: string;
|
|
1024
|
+
en: string;
|
|
1025
|
+
};
|
|
1026
|
+
}, {
|
|
1027
|
+
readonly value: "we";
|
|
1028
|
+
readonly label: {
|
|
1029
|
+
de: string;
|
|
1030
|
+
en: string;
|
|
1031
|
+
};
|
|
1032
|
+
}, {
|
|
1033
|
+
readonly value: "th";
|
|
1034
|
+
readonly label: {
|
|
1035
|
+
de: string;
|
|
1036
|
+
en: string;
|
|
1037
|
+
};
|
|
1038
|
+
}, {
|
|
1039
|
+
readonly value: "fr";
|
|
1040
|
+
readonly label: {
|
|
1041
|
+
de: string;
|
|
1042
|
+
en: string;
|
|
1043
|
+
};
|
|
1044
|
+
}, {
|
|
1045
|
+
readonly value: "sa";
|
|
1046
|
+
readonly label: {
|
|
1047
|
+
de: string;
|
|
1048
|
+
en: string;
|
|
1049
|
+
};
|
|
1050
|
+
}, {
|
|
1051
|
+
readonly value: "su";
|
|
1052
|
+
readonly label: {
|
|
1053
|
+
de: string;
|
|
1054
|
+
en: string;
|
|
1055
|
+
};
|
|
1056
|
+
}];
|
|
1057
|
+
}, "options">;
|
|
1058
|
+
readonly closed: BooleanField & Omit<BooleanField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
1059
|
+
default?: boolean | undefined;
|
|
1060
|
+
};
|
|
1061
|
+
}> & Omit<{
|
|
1062
|
+
readonly itemLabel: Label;
|
|
1063
|
+
readonly fields: {
|
|
1064
|
+
readonly from1: TimeField & {
|
|
1065
|
+
readonly optional: true;
|
|
1066
|
+
readonly showWhen: {
|
|
1067
|
+
readonly field: "closed";
|
|
1068
|
+
readonly not: true;
|
|
1069
|
+
};
|
|
1070
|
+
};
|
|
1071
|
+
readonly to1: TimeField & {
|
|
1072
|
+
readonly optional: true;
|
|
1073
|
+
readonly showWhen: {
|
|
1074
|
+
readonly field: "closed";
|
|
1075
|
+
readonly not: true;
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
readonly from2: TimeField & {
|
|
1079
|
+
readonly optional: true;
|
|
1080
|
+
readonly showWhen: {
|
|
1081
|
+
readonly field: "closed";
|
|
1082
|
+
readonly not: true;
|
|
1083
|
+
};
|
|
1084
|
+
readonly hint: Label;
|
|
1085
|
+
};
|
|
1086
|
+
readonly to2: TimeField & {
|
|
1087
|
+
readonly optional: true;
|
|
1088
|
+
readonly showWhen: {
|
|
1089
|
+
readonly field: "closed";
|
|
1090
|
+
readonly not: true;
|
|
1091
|
+
};
|
|
1092
|
+
};
|
|
1093
|
+
readonly day: ChoiceField<"fr" | "th" | "mo" | "tu" | "we" | "sa" | "su"> & Omit<{
|
|
1094
|
+
readonly options: readonly [{
|
|
1095
|
+
readonly value: "mo";
|
|
1096
|
+
readonly label: {
|
|
1097
|
+
de: string;
|
|
1098
|
+
en: string;
|
|
1099
|
+
};
|
|
1100
|
+
}, {
|
|
1101
|
+
readonly value: "tu";
|
|
1102
|
+
readonly label: {
|
|
1103
|
+
de: string;
|
|
1104
|
+
en: string;
|
|
1105
|
+
};
|
|
1106
|
+
}, {
|
|
1107
|
+
readonly value: "we";
|
|
1108
|
+
readonly label: {
|
|
1109
|
+
de: string;
|
|
1110
|
+
en: string;
|
|
1111
|
+
};
|
|
1112
|
+
}, {
|
|
1113
|
+
readonly value: "th";
|
|
1114
|
+
readonly label: {
|
|
1115
|
+
de: string;
|
|
1116
|
+
en: string;
|
|
1117
|
+
};
|
|
1118
|
+
}, {
|
|
1119
|
+
readonly value: "fr";
|
|
1120
|
+
readonly label: {
|
|
1121
|
+
de: string;
|
|
1122
|
+
en: string;
|
|
1123
|
+
};
|
|
1124
|
+
}, {
|
|
1125
|
+
readonly value: "sa";
|
|
1126
|
+
readonly label: {
|
|
1127
|
+
de: string;
|
|
1128
|
+
en: string;
|
|
1129
|
+
};
|
|
1130
|
+
}, {
|
|
1131
|
+
readonly value: "su";
|
|
1132
|
+
readonly label: {
|
|
1133
|
+
de: string;
|
|
1134
|
+
en: string;
|
|
1135
|
+
};
|
|
1136
|
+
}];
|
|
1137
|
+
}, "options">;
|
|
1138
|
+
readonly closed: BooleanField & Omit<BooleanField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
1139
|
+
default?: boolean | undefined;
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1142
|
+
readonly min: 7;
|
|
1143
|
+
readonly max: 7;
|
|
1144
|
+
readonly unique: "day";
|
|
1145
|
+
readonly default: readonly WeekRow[];
|
|
1146
|
+
}, "fields">;
|
|
1147
|
+
}, undefined>;
|
|
1148
|
+
/**
|
|
1149
|
+
* Weekly hours (two periods a day), closures, a closed day and the owner's choice for public holidays. Which holidays
|
|
1150
|
+
* count is the site's `country` or `calendar`; pass it to the rules (`hoursOn`, `todayState`) as `ctx.country` or `ctx.calendar`.
|
|
1151
|
+
*/
|
|
1152
|
+
declare function hours(opts?: HoursOptions): SingleBrick<{
|
|
1153
|
+
readonly week: ListField<{
|
|
1154
|
+
readonly from1: TimeField & {
|
|
1155
|
+
readonly optional: true;
|
|
1156
|
+
readonly showWhen: {
|
|
1157
|
+
readonly field: "closed";
|
|
1158
|
+
readonly not: true;
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
readonly to1: TimeField & {
|
|
1162
|
+
readonly optional: true;
|
|
1163
|
+
readonly showWhen: {
|
|
1164
|
+
readonly field: "closed";
|
|
1165
|
+
readonly not: true;
|
|
1166
|
+
};
|
|
1167
|
+
};
|
|
1168
|
+
readonly from2: TimeField & {
|
|
1169
|
+
readonly optional: true;
|
|
1170
|
+
readonly showWhen: {
|
|
1171
|
+
readonly field: "closed";
|
|
1172
|
+
readonly not: true;
|
|
1173
|
+
};
|
|
1174
|
+
readonly hint: Label;
|
|
1175
|
+
};
|
|
1176
|
+
readonly to2: TimeField & {
|
|
1177
|
+
readonly optional: true;
|
|
1178
|
+
readonly showWhen: {
|
|
1179
|
+
readonly field: "closed";
|
|
1180
|
+
readonly not: true;
|
|
1181
|
+
};
|
|
1182
|
+
};
|
|
1183
|
+
readonly day: ChoiceField<"fr" | "th" | "mo" | "tu" | "we" | "sa" | "su"> & Omit<{
|
|
1184
|
+
readonly options: readonly [{
|
|
1185
|
+
readonly value: "mo";
|
|
1186
|
+
readonly label: {
|
|
1187
|
+
de: string;
|
|
1188
|
+
en: string;
|
|
1189
|
+
};
|
|
1190
|
+
}, {
|
|
1191
|
+
readonly value: "tu";
|
|
1192
|
+
readonly label: {
|
|
1193
|
+
de: string;
|
|
1194
|
+
en: string;
|
|
1195
|
+
};
|
|
1196
|
+
}, {
|
|
1197
|
+
readonly value: "we";
|
|
1198
|
+
readonly label: {
|
|
1199
|
+
de: string;
|
|
1200
|
+
en: string;
|
|
1201
|
+
};
|
|
1202
|
+
}, {
|
|
1203
|
+
readonly value: "th";
|
|
1204
|
+
readonly label: {
|
|
1205
|
+
de: string;
|
|
1206
|
+
en: string;
|
|
1207
|
+
};
|
|
1208
|
+
}, {
|
|
1209
|
+
readonly value: "fr";
|
|
1210
|
+
readonly label: {
|
|
1211
|
+
de: string;
|
|
1212
|
+
en: string;
|
|
1213
|
+
};
|
|
1214
|
+
}, {
|
|
1215
|
+
readonly value: "sa";
|
|
1216
|
+
readonly label: {
|
|
1217
|
+
de: string;
|
|
1218
|
+
en: string;
|
|
1219
|
+
};
|
|
1220
|
+
}, {
|
|
1221
|
+
readonly value: "su";
|
|
1222
|
+
readonly label: {
|
|
1223
|
+
de: string;
|
|
1224
|
+
en: string;
|
|
1225
|
+
};
|
|
1226
|
+
}];
|
|
1227
|
+
}, "options">;
|
|
1228
|
+
readonly closed: BooleanField & Omit<BooleanField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
1229
|
+
default?: boolean | undefined;
|
|
1230
|
+
};
|
|
1231
|
+
}> & Omit<{
|
|
1232
|
+
readonly itemLabel: Label;
|
|
1233
|
+
readonly fields: {
|
|
1234
|
+
readonly from1: TimeField & {
|
|
1235
|
+
readonly optional: true;
|
|
1236
|
+
readonly showWhen: {
|
|
1237
|
+
readonly field: "closed";
|
|
1238
|
+
readonly not: true;
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
readonly to1: TimeField & {
|
|
1242
|
+
readonly optional: true;
|
|
1243
|
+
readonly showWhen: {
|
|
1244
|
+
readonly field: "closed";
|
|
1245
|
+
readonly not: true;
|
|
1246
|
+
};
|
|
1247
|
+
};
|
|
1248
|
+
readonly from2: TimeField & {
|
|
1249
|
+
readonly optional: true;
|
|
1250
|
+
readonly showWhen: {
|
|
1251
|
+
readonly field: "closed";
|
|
1252
|
+
readonly not: true;
|
|
1253
|
+
};
|
|
1254
|
+
readonly hint: Label;
|
|
1255
|
+
};
|
|
1256
|
+
readonly to2: TimeField & {
|
|
1257
|
+
readonly optional: true;
|
|
1258
|
+
readonly showWhen: {
|
|
1259
|
+
readonly field: "closed";
|
|
1260
|
+
readonly not: true;
|
|
1261
|
+
};
|
|
1262
|
+
};
|
|
1263
|
+
readonly day: ChoiceField<"fr" | "th" | "mo" | "tu" | "we" | "sa" | "su"> & Omit<{
|
|
1264
|
+
readonly options: readonly [{
|
|
1265
|
+
readonly value: "mo";
|
|
1266
|
+
readonly label: {
|
|
1267
|
+
de: string;
|
|
1268
|
+
en: string;
|
|
1269
|
+
};
|
|
1270
|
+
}, {
|
|
1271
|
+
readonly value: "tu";
|
|
1272
|
+
readonly label: {
|
|
1273
|
+
de: string;
|
|
1274
|
+
en: string;
|
|
1275
|
+
};
|
|
1276
|
+
}, {
|
|
1277
|
+
readonly value: "we";
|
|
1278
|
+
readonly label: {
|
|
1279
|
+
de: string;
|
|
1280
|
+
en: string;
|
|
1281
|
+
};
|
|
1282
|
+
}, {
|
|
1283
|
+
readonly value: "th";
|
|
1284
|
+
readonly label: {
|
|
1285
|
+
de: string;
|
|
1286
|
+
en: string;
|
|
1287
|
+
};
|
|
1288
|
+
}, {
|
|
1289
|
+
readonly value: "fr";
|
|
1290
|
+
readonly label: {
|
|
1291
|
+
de: string;
|
|
1292
|
+
en: string;
|
|
1293
|
+
};
|
|
1294
|
+
}, {
|
|
1295
|
+
readonly value: "sa";
|
|
1296
|
+
readonly label: {
|
|
1297
|
+
de: string;
|
|
1298
|
+
en: string;
|
|
1299
|
+
};
|
|
1300
|
+
}, {
|
|
1301
|
+
readonly value: "su";
|
|
1302
|
+
readonly label: {
|
|
1303
|
+
de: string;
|
|
1304
|
+
en: string;
|
|
1305
|
+
};
|
|
1306
|
+
}];
|
|
1307
|
+
}, "options">;
|
|
1308
|
+
readonly closed: BooleanField & Omit<BooleanField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
1309
|
+
default?: boolean | undefined;
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1312
|
+
readonly min: 7;
|
|
1313
|
+
readonly max: 7;
|
|
1314
|
+
readonly unique: "day";
|
|
1315
|
+
readonly default: readonly WeekRow[];
|
|
1316
|
+
}, "fields">;
|
|
1317
|
+
readonly exceptions: ListField<{
|
|
1318
|
+
readonly from1: TimeField & {
|
|
1319
|
+
readonly optional: true;
|
|
1320
|
+
readonly showWhen: {
|
|
1321
|
+
readonly field: "closed";
|
|
1322
|
+
readonly not: true;
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1325
|
+
readonly to1: TimeField & {
|
|
1326
|
+
readonly optional: true;
|
|
1327
|
+
readonly showWhen: {
|
|
1328
|
+
readonly field: "closed";
|
|
1329
|
+
readonly not: true;
|
|
1330
|
+
};
|
|
1331
|
+
};
|
|
1332
|
+
readonly from2: TimeField & {
|
|
1333
|
+
readonly optional: true;
|
|
1334
|
+
readonly showWhen: {
|
|
1335
|
+
readonly field: "closed";
|
|
1336
|
+
readonly not: true;
|
|
1337
|
+
};
|
|
1338
|
+
readonly hint: Label;
|
|
1339
|
+
};
|
|
1340
|
+
readonly to2: TimeField & {
|
|
1341
|
+
readonly optional: true;
|
|
1342
|
+
readonly showWhen: {
|
|
1343
|
+
readonly field: "closed";
|
|
1344
|
+
readonly not: true;
|
|
1345
|
+
};
|
|
1346
|
+
};
|
|
1347
|
+
readonly when: DateRangeField & Omit<DateRangeField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
1348
|
+
default?: {
|
|
1349
|
+
from: string;
|
|
1350
|
+
to: string;
|
|
1351
|
+
} | undefined;
|
|
1352
|
+
};
|
|
1353
|
+
readonly reason: TextField & {
|
|
1354
|
+
readonly max: 140;
|
|
1355
|
+
readonly hint: Label;
|
|
1356
|
+
};
|
|
1357
|
+
readonly closed: BooleanField & {
|
|
1358
|
+
readonly default: true;
|
|
1359
|
+
};
|
|
1360
|
+
}> & Omit<{
|
|
1361
|
+
readonly itemLabel: Label;
|
|
1362
|
+
readonly fields: {
|
|
1363
|
+
readonly from1: TimeField & {
|
|
1364
|
+
readonly optional: true;
|
|
1365
|
+
readonly showWhen: {
|
|
1366
|
+
readonly field: "closed";
|
|
1367
|
+
readonly not: true;
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
readonly to1: TimeField & {
|
|
1371
|
+
readonly optional: true;
|
|
1372
|
+
readonly showWhen: {
|
|
1373
|
+
readonly field: "closed";
|
|
1374
|
+
readonly not: true;
|
|
1375
|
+
};
|
|
1376
|
+
};
|
|
1377
|
+
readonly from2: TimeField & {
|
|
1378
|
+
readonly optional: true;
|
|
1379
|
+
readonly showWhen: {
|
|
1380
|
+
readonly field: "closed";
|
|
1381
|
+
readonly not: true;
|
|
1382
|
+
};
|
|
1383
|
+
readonly hint: Label;
|
|
1384
|
+
};
|
|
1385
|
+
readonly to2: TimeField & {
|
|
1386
|
+
readonly optional: true;
|
|
1387
|
+
readonly showWhen: {
|
|
1388
|
+
readonly field: "closed";
|
|
1389
|
+
readonly not: true;
|
|
1390
|
+
};
|
|
1391
|
+
};
|
|
1392
|
+
readonly when: DateRangeField & Omit<DateRangeField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
1393
|
+
default?: {
|
|
1394
|
+
from: string;
|
|
1395
|
+
to: string;
|
|
1396
|
+
} | undefined;
|
|
1397
|
+
};
|
|
1398
|
+
readonly reason: TextField & {
|
|
1399
|
+
readonly max: 140;
|
|
1400
|
+
readonly hint: Label;
|
|
1401
|
+
};
|
|
1402
|
+
readonly closed: BooleanField & {
|
|
1403
|
+
readonly default: true;
|
|
1404
|
+
};
|
|
1405
|
+
};
|
|
1406
|
+
readonly max: 20;
|
|
1407
|
+
readonly default: readonly [];
|
|
1408
|
+
}, "fields">;
|
|
1409
|
+
readonly closedOn: DateField & {
|
|
1410
|
+
readonly optional: true;
|
|
1411
|
+
readonly hint: Label;
|
|
1412
|
+
};
|
|
1413
|
+
readonly closedNote: TextField & {
|
|
1414
|
+
readonly max: 140;
|
|
1415
|
+
readonly optional: true;
|
|
1416
|
+
readonly hint: Label;
|
|
1417
|
+
};
|
|
1418
|
+
readonly holidayNoticeDays: NumberField & {
|
|
1419
|
+
readonly min: 0;
|
|
1420
|
+
readonly max: 60;
|
|
1421
|
+
readonly step: 1;
|
|
1422
|
+
readonly default: 14;
|
|
1423
|
+
readonly hint: Label;
|
|
1424
|
+
};
|
|
1425
|
+
readonly holidays: ChoiceField<"closed" | "sunday" | "normal"> & Omit<{
|
|
1426
|
+
readonly options: readonly [{
|
|
1427
|
+
readonly value: "sunday";
|
|
1428
|
+
readonly label: Label;
|
|
1429
|
+
}, {
|
|
1430
|
+
readonly value: "closed";
|
|
1431
|
+
readonly label: Label;
|
|
1432
|
+
}, {
|
|
1433
|
+
readonly value: "normal";
|
|
1434
|
+
readonly label: Label;
|
|
1435
|
+
}];
|
|
1436
|
+
readonly optional: true;
|
|
1437
|
+
readonly default: "sunday";
|
|
1438
|
+
readonly hint: Label;
|
|
1439
|
+
}, "options">;
|
|
1440
|
+
}>;
|
|
1441
|
+
/** Own weekly hours for a date range: a season (yearly) or "new hours from a date" (open end). */
|
|
1442
|
+
declare function hourPlans(opts?: BasicsOptions): CollectionBrick<{
|
|
1443
|
+
readonly label: TextField & {
|
|
1444
|
+
readonly max: 80;
|
|
1445
|
+
};
|
|
1446
|
+
readonly from: DateField & Omit<DateField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
1447
|
+
default?: string | undefined;
|
|
1448
|
+
};
|
|
1449
|
+
readonly to: DateField & {
|
|
1450
|
+
readonly optional: true;
|
|
1451
|
+
};
|
|
1452
|
+
readonly yearly: BooleanField & {
|
|
1453
|
+
readonly default: false;
|
|
1454
|
+
};
|
|
1455
|
+
readonly week: ListField<{
|
|
1456
|
+
readonly from1: TimeField & {
|
|
1457
|
+
readonly optional: true;
|
|
1458
|
+
readonly showWhen: {
|
|
1459
|
+
readonly field: "closed";
|
|
1460
|
+
readonly not: true;
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1463
|
+
readonly to1: TimeField & {
|
|
1464
|
+
readonly optional: true;
|
|
1465
|
+
readonly showWhen: {
|
|
1466
|
+
readonly field: "closed";
|
|
1467
|
+
readonly not: true;
|
|
1468
|
+
};
|
|
1469
|
+
};
|
|
1470
|
+
readonly from2: TimeField & {
|
|
1471
|
+
readonly optional: true;
|
|
1472
|
+
readonly showWhen: {
|
|
1473
|
+
readonly field: "closed";
|
|
1474
|
+
readonly not: true;
|
|
1475
|
+
};
|
|
1476
|
+
readonly hint: Label;
|
|
1477
|
+
};
|
|
1478
|
+
readonly to2: TimeField & {
|
|
1479
|
+
readonly optional: true;
|
|
1480
|
+
readonly showWhen: {
|
|
1481
|
+
readonly field: "closed";
|
|
1482
|
+
readonly not: true;
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
readonly day: ChoiceField<"fr" | "th" | "mo" | "tu" | "we" | "sa" | "su"> & Omit<{
|
|
1486
|
+
readonly options: readonly [{
|
|
1487
|
+
readonly value: "mo";
|
|
1488
|
+
readonly label: {
|
|
1489
|
+
de: string;
|
|
1490
|
+
en: string;
|
|
1491
|
+
};
|
|
1492
|
+
}, {
|
|
1493
|
+
readonly value: "tu";
|
|
1494
|
+
readonly label: {
|
|
1495
|
+
de: string;
|
|
1496
|
+
en: string;
|
|
1497
|
+
};
|
|
1498
|
+
}, {
|
|
1499
|
+
readonly value: "we";
|
|
1500
|
+
readonly label: {
|
|
1501
|
+
de: string;
|
|
1502
|
+
en: string;
|
|
1503
|
+
};
|
|
1504
|
+
}, {
|
|
1505
|
+
readonly value: "th";
|
|
1506
|
+
readonly label: {
|
|
1507
|
+
de: string;
|
|
1508
|
+
en: string;
|
|
1509
|
+
};
|
|
1510
|
+
}, {
|
|
1511
|
+
readonly value: "fr";
|
|
1512
|
+
readonly label: {
|
|
1513
|
+
de: string;
|
|
1514
|
+
en: string;
|
|
1515
|
+
};
|
|
1516
|
+
}, {
|
|
1517
|
+
readonly value: "sa";
|
|
1518
|
+
readonly label: {
|
|
1519
|
+
de: string;
|
|
1520
|
+
en: string;
|
|
1521
|
+
};
|
|
1522
|
+
}, {
|
|
1523
|
+
readonly value: "su";
|
|
1524
|
+
readonly label: {
|
|
1525
|
+
de: string;
|
|
1526
|
+
en: string;
|
|
1527
|
+
};
|
|
1528
|
+
}];
|
|
1529
|
+
}, "options">;
|
|
1530
|
+
readonly closed: BooleanField & Omit<BooleanField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
1531
|
+
default?: boolean | undefined;
|
|
1532
|
+
};
|
|
1533
|
+
}> & Omit<{
|
|
1534
|
+
readonly itemLabel: Label;
|
|
1535
|
+
readonly fields: {
|
|
1536
|
+
readonly from1: TimeField & {
|
|
1537
|
+
readonly optional: true;
|
|
1538
|
+
readonly showWhen: {
|
|
1539
|
+
readonly field: "closed";
|
|
1540
|
+
readonly not: true;
|
|
1541
|
+
};
|
|
1542
|
+
};
|
|
1543
|
+
readonly to1: TimeField & {
|
|
1544
|
+
readonly optional: true;
|
|
1545
|
+
readonly showWhen: {
|
|
1546
|
+
readonly field: "closed";
|
|
1547
|
+
readonly not: true;
|
|
1548
|
+
};
|
|
1549
|
+
};
|
|
1550
|
+
readonly from2: TimeField & {
|
|
1551
|
+
readonly optional: true;
|
|
1552
|
+
readonly showWhen: {
|
|
1553
|
+
readonly field: "closed";
|
|
1554
|
+
readonly not: true;
|
|
1555
|
+
};
|
|
1556
|
+
readonly hint: Label;
|
|
1557
|
+
};
|
|
1558
|
+
readonly to2: TimeField & {
|
|
1559
|
+
readonly optional: true;
|
|
1560
|
+
readonly showWhen: {
|
|
1561
|
+
readonly field: "closed";
|
|
1562
|
+
readonly not: true;
|
|
1563
|
+
};
|
|
1564
|
+
};
|
|
1565
|
+
readonly day: ChoiceField<"fr" | "th" | "mo" | "tu" | "we" | "sa" | "su"> & Omit<{
|
|
1566
|
+
readonly options: readonly [{
|
|
1567
|
+
readonly value: "mo";
|
|
1568
|
+
readonly label: {
|
|
1569
|
+
de: string;
|
|
1570
|
+
en: string;
|
|
1571
|
+
};
|
|
1572
|
+
}, {
|
|
1573
|
+
readonly value: "tu";
|
|
1574
|
+
readonly label: {
|
|
1575
|
+
de: string;
|
|
1576
|
+
en: string;
|
|
1577
|
+
};
|
|
1578
|
+
}, {
|
|
1579
|
+
readonly value: "we";
|
|
1580
|
+
readonly label: {
|
|
1581
|
+
de: string;
|
|
1582
|
+
en: string;
|
|
1583
|
+
};
|
|
1584
|
+
}, {
|
|
1585
|
+
readonly value: "th";
|
|
1586
|
+
readonly label: {
|
|
1587
|
+
de: string;
|
|
1588
|
+
en: string;
|
|
1589
|
+
};
|
|
1590
|
+
}, {
|
|
1591
|
+
readonly value: "fr";
|
|
1592
|
+
readonly label: {
|
|
1593
|
+
de: string;
|
|
1594
|
+
en: string;
|
|
1595
|
+
};
|
|
1596
|
+
}, {
|
|
1597
|
+
readonly value: "sa";
|
|
1598
|
+
readonly label: {
|
|
1599
|
+
de: string;
|
|
1600
|
+
en: string;
|
|
1601
|
+
};
|
|
1602
|
+
}, {
|
|
1603
|
+
readonly value: "su";
|
|
1604
|
+
readonly label: {
|
|
1605
|
+
de: string;
|
|
1606
|
+
en: string;
|
|
1607
|
+
};
|
|
1608
|
+
}];
|
|
1609
|
+
}, "options">;
|
|
1610
|
+
readonly closed: BooleanField & Omit<BooleanField, "default" | "type" | "label" | "pos" | "retired"> & {
|
|
1611
|
+
default?: boolean | undefined;
|
|
1612
|
+
};
|
|
1613
|
+
};
|
|
1614
|
+
readonly min: 7;
|
|
1615
|
+
readonly max: 7;
|
|
1616
|
+
readonly unique: "day";
|
|
1617
|
+
readonly default: readonly WeekRow[];
|
|
1618
|
+
}, "fields">;
|
|
1619
|
+
}, undefined>;
|
|
1620
|
+
|
|
1621
|
+
export { hoursOn as A, notices as C, noticesOn as F, offerJsonLd as G, planOn as I, sessions as J, sessionsInOrder as K, singaporeHolidays as L, spansOf as M, spansText as N, timesOf as O, todayState as P, upcomingClosures as Q, upcomingHolidayClosures as R, upcomingPlans as U, weekFor as V, weekOf as X, weekdayOf as Y, eventsBrick as a1, hourPlansBrick as a2, hoursBrick as a3, noticesBrick as a4, offerPrice as a5, postalAddress as a6, weekdays as a7, austrianHolidays as p, calendarIn as q, calendarOf as r, closedOnClosure as s, eventJsonLd as t, events as u, germanHolidays as v, holidayOn as w, hourPlans as x, hours as y, hoursLine as z };
|
|
1622
|
+
export type { PostalAddressInput as $, BasicsOptions as B, DayHours as D, EventJsonLdInput as E, HoursContext as H, SessionJsonLdInput as S, Times as T, Weekday as W, HoursTexts as Z, NoticeTask as _, DayRule as a, WeekRow as a0, EventsOptions as b, Exception as c, HolidayClosure as d, HolidayNames as e, HolidaySetting as f, HourPlan as g, HoursData as h, HoursLine as i, HoursLineContext as j, HoursOptions as k, HoursSource as l, SessionStatus as m, Span as n, TodayState as o };
|