@forgebuild/hotal-ui 0.23.1 → 0.23.3

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/index.d.ts CHANGED
@@ -249,6 +249,11 @@ export interface LiveReservationRestaurantRef {
249
249
  name: string;
250
250
  }
251
251
 
252
+ export interface LiveReservationsFeedDateFilterEventDetail {
253
+ filterDateFrom?: string;
254
+ filterDateTo?: string;
255
+ }
256
+
252
257
  export interface LiveReservationsFeedElement extends HTMLElement {
253
258
  heading?: string;
254
259
  channelName?: string;
@@ -259,7 +264,12 @@ export interface LiveReservationsFeedElement extends HTMLElement {
259
264
  * subsequent call passes the `created_at` of the oldest loaded
260
265
  * reservation so only the next page is fetched. Return fewer than
261
266
  * `limit` items to signal there's nothing older left. */
262
- fetchReservations?: (params: { cursor?: string; limit: number }) => Promise<LiveReservation[]>;
267
+ fetchReservations?: (params: {
268
+ cursor?: string;
269
+ limit: number;
270
+ filterDateFrom?: string;
271
+ filterDateTo?: string;
272
+ }) => Promise<LiveReservation[]>;
263
273
  restaurants?: LiveReservationRestaurantRef[];
264
274
  maxItems?: number;
265
275
  /** Set false to stop fetching further pages once the first one loads --
@@ -271,6 +281,21 @@ export interface LiveReservationsFeedElement extends HTMLElement {
271
281
  * as a JS property to get false -- Boolean-typed custom-element
272
282
  * attributes are presence-based. Default true. */
273
283
  showEmail?: boolean;
284
+ /** Restricts the feed to reservations booked for this date range
285
+ * (inclusive, 'YYYY-MM-DD'), filtering by reservation_date -- not
286
+ * created_at, which stays reserved for pagination. Either bound can be
287
+ * set alone for an open-ended range. Passed through to
288
+ * fetchReservations so the host can scope the query server-side;
289
+ * changing either value triggers a full refetch. Also guards live
290
+ * new-reservation / reservation-status-changed events. */
291
+ filterDateFrom?: string;
292
+ filterDateTo?: string;
293
+ /** Set true to render a built-in from/to date picker in the header,
294
+ * seeded from filterDateFrom/filterDateTo and driving the same
295
+ * filtering -- for host pages that don't want to build their own
296
+ * filter UI. Leave false (default) to filter purely via the props.
297
+ * Picking a date emits `date-filter-change` with the new range. */
298
+ showDateFilter?: boolean;
274
299
  }
275
300
 
276
301
  export interface LiveRoomBooking {
@@ -950,6 +975,7 @@ declare global {
950
975
  ready: CustomEvent<undefined>;
951
976
  'extras-change': CustomEvent<ExtrasCatalogueChangeEventDetail>;
952
977
  'order-placed': CustomEvent<RestaurantOrderPlacedEventDetail>;
978
+ 'date-filter-change': CustomEvent<LiveReservationsFeedDateFilterEventDetail>;
953
979
  // Not declared here: `searchable-select` dispatches a CustomEvent named
954
980
  // literally "change" (SearchableSelectChangeEventDetail, above). Adding
955
981
  // it to this global map would override the native `change: Event` type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgebuild/hotal-ui",
3
- "version": "0.23.1",
3
+ "version": "0.23.3",
4
4
  "description": "Reusable Svelte UI components for booking and reservation experiences.",
5
5
  "type": "module",
6
6
  "license": "MIT",