@duffel/components 3.5.0--canary-6 → 3.5.0--canary-8
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 +1 -1
- package/components/DuffelCardForm/DuffelCardForm.d.ts +1 -5
- package/components/DuffelCardForm/lib/useDuffelCardFormActions.d.ts +11 -10
- package/components/DuffelNGSView/DuffelNGSView.d.ts +2 -0
- package/components/DuffelNGSView/NGSShelfInfoCard.d.ts +1 -0
- package/components/DuffelNGSView/NGSSliceFareCard.d.ts +1 -0
- package/components/DuffelNGSView/SliceSummary.d.ts +7 -0
- package/components/DuffelNGSView/lib/group-offers-for-ngs-view.d.ts +3 -0
- package/components/DuffelNGSView/lib/index.d.ts +2 -2
- package/components/DuffelNGSView/lib/sort-ngs-rows.d.ts +4 -0
- package/components/shared/Icon.d.ts +3 -0
- package/components/shared/SliceCarriersTitle.d.ts +7 -0
- package/custom-elements.js +17 -17
- package/custom-elements.js.map +3 -3
- package/index.js +12 -12
- package/index.js.map +3 -3
- package/lib/colors.d.ts +1 -0
- package/package.json +3 -3
- package/stories/DuffelNGSView.stories.d.ts +3 -4
- package/stories/SliceCarriersTitle.stories.d.ts +10 -0
- package/stories/SliceSummary.stories.d.ts +6 -0
- package/stories/StaysRoomRateCard.stories.d.ts +28 -30
- package/tsconfig.tsbuildinfo +1 -1
- package/components/DuffelCardForm/lib/getNewActionsStack.d.ts +0 -2
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,8 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { DuffelCardFormProps } from "./lib/types";
|
|
3
|
-
|
|
4
|
-
saveCard: () => void;
|
|
5
|
-
createCardForTemporaryUse: () => void;
|
|
6
|
-
};
|
|
3
|
+
import { DuffelCardFormActions } from "./lib/useDuffelCardFormActions";
|
|
7
4
|
export declare const DuffelCardForm: React.ForwardRefExoticComponent<DuffelCardFormProps & React.RefAttributes<DuffelCardFormActions>>;
|
|
8
|
-
export {};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DuffelCardFormActions {
|
|
3
|
+
saveCard: () => void;
|
|
4
|
+
createCardForTemporaryUse: () => void;
|
|
5
|
+
}
|
|
2
6
|
export interface UseDuffelCardFormActionsHook {
|
|
3
7
|
/**
|
|
4
|
-
* The
|
|
5
|
-
* You do not have have to modify this array directly, instead rely on `triggerSaveCard` and `triggerCreateCardForTemporaryUse` to update the array.
|
|
8
|
+
* The ref you should pass to the DuffelCardForm component.
|
|
6
9
|
*/
|
|
7
|
-
|
|
10
|
+
ref: React.RefObject<DuffelCardFormActions>;
|
|
8
11
|
/**
|
|
9
12
|
* Call this function to tell the component to save the card.
|
|
10
13
|
*/
|
|
11
|
-
|
|
14
|
+
saveCard: () => void;
|
|
12
15
|
/**
|
|
13
16
|
* Call this function to tell the component to create a card for temporary use.
|
|
14
17
|
*/
|
|
15
|
-
|
|
18
|
+
createCardForTemporaryUse: () => void;
|
|
16
19
|
}
|
|
17
20
|
/**
|
|
18
|
-
* This hook
|
|
19
|
-
* Add `
|
|
20
|
-
*
|
|
21
|
-
* In the background, this hook is setting the state on actions prop and the component's useEffect hook will trigger the action.
|
|
21
|
+
* This hook abstracts the ref for convenience and readability.
|
|
22
|
+
* Add `ref` to the `DuffelCardForm` `ref` prop and call the functions to trigger the actions you'd like.
|
|
22
23
|
*/
|
|
23
24
|
export declare function useDuffelCardFormActions(): UseDuffelCardFormActionsHook;
|
|
@@ -2,5 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { OfferWithNGS } from "./lib";
|
|
3
3
|
export interface DuffelNGSViewProps {
|
|
4
4
|
offers: OfferWithNGS[];
|
|
5
|
+
sliceIndex: number;
|
|
6
|
+
onSelect: (offerId: string) => void;
|
|
5
7
|
}
|
|
6
8
|
export declare const DuffelNGSView: React.FC<DuffelNGSViewProps>;
|
|
@@ -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"
|
|
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
|
};
|
|
@@ -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>;
|