@duffel/components 3.5.0--canary-7 → 3.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/README.md CHANGED
@@ -125,7 +125,7 @@ If you are not in a node environment and can't rely on npm to install the packag
125
125
  document.querySelector("duffel-ancillaries");
126
126
 
127
127
  duffelAncillariesElement.addEventListener("onPayloadReady", (event) =>
128
- console.log("onPayloadReady\n", event.detail)
128
+ console.log("onPayloadReady\n", event.detail),
129
129
  );
130
130
  ```
131
131
 
@@ -1,3 +1,4 @@
1
1
  import * as React from "react";
2
2
  import { DuffelCardFormProps } from "./lib/types";
3
+ import { DuffelCardFormActions } from "./lib/useDuffelCardFormActions";
3
4
  export declare const DuffelCardForm: React.ForwardRefExoticComponent<DuffelCardFormProps & React.RefAttributes<DuffelCardFormActions>>;
@@ -18,7 +18,7 @@ export interface UseDuffelCardFormActionsHook {
18
18
  createCardForTemporaryUse: () => void;
19
19
  }
20
20
  /**
21
- * This hook abstracts the ref for convinience and readability.
21
+ * This hook abstracts the ref for convenience and readability.
22
22
  * Add `ref` to the `DuffelCardForm` `ref` prop and call the functions to trigger the actions you'd like.
23
23
  */
24
24
  export declare function useDuffelCardFormActions(): UseDuffelCardFormActionsHook;
@@ -2,5 +2,6 @@ import * as React from "react";
2
2
  import { OfferWithNGS } from "./lib";
3
3
  export interface DuffelNGSViewProps {
4
4
  offers: OfferWithNGS[];
5
+ sliceIndex: number;
5
6
  }
6
7
  export declare const DuffelNGSView: React.FC<DuffelNGSViewProps>;
@@ -0,0 +1,3 @@
1
+ import { NGSShelf, OfferSliceWithNGS, OfferWithNGS } from ".";
2
+ export type NGSOfferRow = Record<"slice", OfferSliceWithNGS> & Record<NGSShelf, OfferWithNGS | null>;
3
+ export declare const groupOffersForNGSView: (offers: OfferWithNGS[], sliceIndex: number) => NGSOfferRow[];
@@ -1,7 +1,7 @@
1
1
  /// <reference types="@duffel/api" />
2
2
  import { IconName } from "@components/shared/Icon";
3
3
  import { Offer, OfferSlice, OfferSliceSegment, OfferSliceSegmentPassenger } from "@duffel/api/types";
4
- export declare const NGS_SHELVES: readonly ["1", "2", "3", "4", "5", "6"];
4
+ export declare const NGS_SHELVES: readonly ["1", "2", "3", "4", "5"];
5
5
  export type NGSShelf = (typeof NGS_SHELVES)[number];
6
6
  type SeatWithNGS = {
7
7
  type: string;
@@ -31,7 +31,7 @@ type OfferSliceSegmentPassengerWithNGS = OfferSliceSegmentPassenger & {
31
31
  export type OfferSliceSegmentWithNGS = OfferSliceSegment & {
32
32
  passengers: OfferSliceSegmentPassengerWithNGS[];
33
33
  };
34
- type OfferSliceWithNGS = OfferSlice & {
34
+ export type OfferSliceWithNGS = OfferSlice & {
35
35
  segments: OfferSliceSegmentWithNGS[];
36
36
  ngs_shelf: NGSShelf;
37
37
  };
@@ -0,0 +1,4 @@
1
+ import { NGSShelf } from ".";
2
+ import { NGSOfferRow } from "./group-offers-for-ngs-view";
3
+ export type SortDirection = "asc" | "desc";
4
+ export declare const sortNGSRows: (rows: NGSOfferRow[], sortShelf: NGSShelf, sortDirection: SortDirection) => NGSOfferRow[];
@@ -10,9 +10,11 @@ export declare const ICON_MAP: {
10
10
  airline_seat_recline_normal: import("react/jsx-runtime").JSX.Element;
11
11
  airplane_ticket: import("react/jsx-runtime").JSX.Element;
12
12
  apartment: import("react/jsx-runtime").JSX.Element;
13
+ arrow_downward: import("react/jsx-runtime").JSX.Element;
13
14
  arrow_forward: import("react/jsx-runtime").JSX.Element;
14
15
  arrow_left: import("react/jsx-runtime").JSX.Element;
15
16
  arrow_right: import("react/jsx-runtime").JSX.Element;
17
+ arrow_upward: import("react/jsx-runtime").JSX.Element;
16
18
  atm: import("react/jsx-runtime").JSX.Element;
17
19
  autorenew: import("react/jsx-runtime").JSX.Element;
18
20
  bakery_dining: import("react/jsx-runtime").JSX.Element;
@@ -69,6 +71,7 @@ export declare const ICON_MAP: {
69
71
  spa: import("react/jsx-runtime").JSX.Element;
70
72
  stairs: import("react/jsx-runtime").JSX.Element;
71
73
  star: import("react/jsx-runtime").JSX.Element;
74
+ unfold_more: import("react/jsx-runtime").JSX.Element;
72
75
  wallet: import("react/jsx-runtime").JSX.Element;
73
76
  warning: import("react/jsx-runtime").JSX.Element;
74
77
  wifi: import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="@duffel/api" />
2
+ import { OfferSlice } from "@duffel/api/types";
3
+ import * as React from "react";
4
+ export interface SliceCarriersTitleProps {
5
+ slice: OfferSlice;
6
+ }
7
+ export declare const SliceCarriersTitle: React.FC<SliceCarriersTitleProps>;