@duffel/components 3.12.3 → 3.13.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.
@@ -17,6 +17,11 @@ export interface DuffelAncillariesCommonProps {
17
17
  * If you pass default selected seat services, they will be used to initiate the state when the component mounts. Any further updates will be ignored.
18
18
  */
19
19
  defaultSeatSelectedServices?: WithSeatServiceInformation<CreateOrderService>[];
20
+ /**
21
+ * You can use this prop to change some of the strings used in the component so it
22
+ * can be localised to the user's language.
23
+ */
24
+ localisationStrings?: DuffelAncillariesLocalisationStrings;
20
25
  }
21
26
  export interface DuffelAncillariesPropsWithOfferIdForFixture extends DuffelAncillariesCommonProps {
22
27
  /**
@@ -71,6 +76,29 @@ export interface DuffelAncillariesPriceFormatters {
71
76
  seats?: DuffelAncillariesPriceFormatterForSeats;
72
77
  cancel_for_any_reason?: DuffelAncillariesPriceFormatterForCancelForAnyReason;
73
78
  }
79
+ export interface DuffelAncillariesLocalisationStrings {
80
+ /**
81
+ * Use this to localise the maximum baggage dimensions.
82
+ *
83
+ * For example, if you want to localise the baggage dimensions from centimeters to inches, you may use:
84
+ *
85
+ * ```js
86
+ * (heightInCentimeters, lengthInCentimeters, depthInCentimeters) =>
87
+ * `${heightInCentimeters * CM_TO_INCHES} x ${lengthInCentimeters * CM_TO_INCHES} x ${depthInCentimeters * CM_TO_INCHES} in`
88
+ * ```
89
+ */
90
+ baggageMaximumDimensions?: (heightInCentimeters: number, lengthInCentimeters: number, depthInCentimeters: number) => string;
91
+ /**
92
+ * Use this to localise the maximum baggage weight.
93
+ *
94
+ * For example, if you want to localise the baggage weight from kilograms to pounds, you may use:
95
+ *
96
+ * ```js
97
+ * (weightInKilograms: number) => `${weightInKilograms * KG_TO_POUNDS} lbs`
98
+ * ```
99
+ */
100
+ baggageMaximumWeight?: (weightInKilograms: number) => string;
101
+ }
74
102
  export interface CustomStyles {
75
103
  accentColor?: string;
76
104
  buttonCornerRadius?: string;