@qite/tide-booking-component 1.4.62 → 1.4.63

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.
@@ -32964,6 +32964,14 @@ var QSMContainer = function () {
32964
32964
  return field !== undefined;
32965
32965
  });
32966
32966
  addSearchFieldsToPayload(payload, searchFields, qsmState);
32967
+ if (destination) {
32968
+ var option = destination.options.find(function (opt) {
32969
+ return opt.value === qsmState[destination.fieldKey];
32970
+ });
32971
+ if (option) {
32972
+ payload.destinationType = option === null || option === void 0 ? void 0 : option.type;
32973
+ }
32974
+ }
32967
32975
  onSubmit(payload);
32968
32976
  console.log('Submitted QSM data:', payload);
32969
32977
  };
@@ -44916,10 +44924,10 @@ var ImageWithTextCard = function (_a) {
44916
44924
  imageSrc = _a.imageSrc,
44917
44925
  imageAlt = _a.imageAlt,
44918
44926
  title = _a.title,
44919
- activityTitle = _a.activityTitle,
44920
- activityText = _a.activityText,
44921
- detailsTitle = _a.detailsTitle,
44922
- detailsText = _a.detailsText,
44927
+ section1Title = _a.section1Title,
44928
+ section1Text = _a.section1Text,
44929
+ section2Title = _a.section2Title,
44930
+ section2Text = _a.section2Text,
44923
44931
  buttonText = _a.buttonText,
44924
44932
  onButtonClick = _a.onButtonClick;
44925
44933
  var cardClassName = 'image-with-text__card';
@@ -44947,14 +44955,14 @@ var ImageWithTextCard = function (_a) {
44947
44955
  React__default['default'].createElement(
44948
44956
  'div',
44949
44957
  { className: 'image-with-text__card__description' },
44950
- React__default['default'].createElement('h5', { className: 'image-with-text__card__description__title' }, activityTitle),
44951
- React__default['default'].createElement('p', { className: 'image-with-text__card__description__text' }, activityText)
44958
+ React__default['default'].createElement('h5', { className: 'image-with-text__card__description__title' }, section1Title),
44959
+ React__default['default'].createElement('p', { className: 'image-with-text__card__description__text' }, section1Text)
44952
44960
  ),
44953
44961
  React__default['default'].createElement(
44954
44962
  'div',
44955
44963
  { className: 'image-with-text__card__description' },
44956
- React__default['default'].createElement('h5', { className: 'image-with-text__card__description__title' }, detailsTitle),
44957
- React__default['default'].createElement('p', { className: 'image-with-text__card__description__text' }, detailsText)
44964
+ React__default['default'].createElement('h5', { className: 'image-with-text__card__description__title' }, section2Title),
44965
+ React__default['default'].createElement('p', { className: 'image-with-text__card__description__text' }, section2Text)
44958
44966
  ),
44959
44967
  React__default['default'].createElement(
44960
44968
  'div',
@@ -4,16 +4,16 @@ export interface ImageWithTextSectionProps {
4
4
  cards: ImageWithTextCardProps[];
5
5
  }
6
6
  export interface ImageWithTextCardProps {
7
- noCard?: boolean;
8
- fullImage?: boolean;
9
- reverse?: boolean;
10
7
  imageSrc: string;
11
8
  imageAlt: string;
12
9
  title: string;
13
- activityTitle: string;
14
- activityText: string;
15
- detailsTitle: string;
16
- detailsText: string;
10
+ section1Title: string;
11
+ section1Text: string;
12
+ section2Title: string;
13
+ section2Text: string;
17
14
  buttonText: string;
18
15
  onButtonClick?: () => void;
16
+ noCard?: boolean;
17
+ fullImage?: boolean;
18
+ reverse?: boolean;
19
19
  }
@@ -32833,6 +32833,14 @@ var QSMContainer = function () {
32833
32833
  return field !== undefined;
32834
32834
  });
32835
32835
  addSearchFieldsToPayload(payload, searchFields, qsmState);
32836
+ if (destination) {
32837
+ var option = destination.options.find(function (opt) {
32838
+ return opt.value === qsmState[destination.fieldKey];
32839
+ });
32840
+ if (option) {
32841
+ payload.destinationType = option === null || option === void 0 ? void 0 : option.type;
32842
+ }
32843
+ }
32836
32844
  onSubmit(payload);
32837
32845
  console.log('Submitted QSM data:', payload);
32838
32846
  };
@@ -44624,10 +44632,10 @@ var ImageWithTextCard = function (_a) {
44624
44632
  imageSrc = _a.imageSrc,
44625
44633
  imageAlt = _a.imageAlt,
44626
44634
  title = _a.title,
44627
- activityTitle = _a.activityTitle,
44628
- activityText = _a.activityText,
44629
- detailsTitle = _a.detailsTitle,
44630
- detailsText = _a.detailsText,
44635
+ section1Title = _a.section1Title,
44636
+ section1Text = _a.section1Text,
44637
+ section2Title = _a.section2Title,
44638
+ section2Text = _a.section2Text,
44631
44639
  buttonText = _a.buttonText,
44632
44640
  onButtonClick = _a.onButtonClick;
44633
44641
  var cardClassName = 'image-with-text__card';
@@ -44655,14 +44663,14 @@ var ImageWithTextCard = function (_a) {
44655
44663
  React__default.createElement(
44656
44664
  'div',
44657
44665
  { className: 'image-with-text__card__description' },
44658
- React__default.createElement('h5', { className: 'image-with-text__card__description__title' }, activityTitle),
44659
- React__default.createElement('p', { className: 'image-with-text__card__description__text' }, activityText)
44666
+ React__default.createElement('h5', { className: 'image-with-text__card__description__title' }, section1Title),
44667
+ React__default.createElement('p', { className: 'image-with-text__card__description__text' }, section1Text)
44660
44668
  ),
44661
44669
  React__default.createElement(
44662
44670
  'div',
44663
44671
  { className: 'image-with-text__card__description' },
44664
- React__default.createElement('h5', { className: 'image-with-text__card__description__title' }, detailsTitle),
44665
- React__default.createElement('p', { className: 'image-with-text__card__description__text' }, detailsText)
44672
+ React__default.createElement('h5', { className: 'image-with-text__card__description__title' }, section2Title),
44673
+ React__default.createElement('p', { className: 'image-with-text__card__description__text' }, section2Text)
44666
44674
  ),
44667
44675
  React__default.createElement(
44668
44676
  'div',
@@ -4,16 +4,16 @@ export interface ImageWithTextSectionProps {
4
4
  cards: ImageWithTextCardProps[];
5
5
  }
6
6
  export interface ImageWithTextCardProps {
7
- noCard?: boolean;
8
- fullImage?: boolean;
9
- reverse?: boolean;
10
7
  imageSrc: string;
11
8
  imageAlt: string;
12
9
  title: string;
13
- activityTitle: string;
14
- activityText: string;
15
- detailsTitle: string;
16
- detailsText: string;
10
+ section1Title: string;
11
+ section1Text: string;
12
+ section2Title: string;
13
+ section2Text: string;
17
14
  buttonText: string;
18
15
  onButtonClick?: () => void;
16
+ noCard?: boolean;
17
+ fullImage?: boolean;
18
+ reverse?: boolean;
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-booking-component",
3
- "version": "1.4.62",
3
+ "version": "1.4.63",
4
4
  "description": "React Booking wizard & Booking product component for Tide",
5
5
  "main": "build/build-cjs/index.js",
6
6
  "types": "build/build-cjs/src/index.d.ts",
@@ -8,10 +8,10 @@ const ImageWithTextCard: React.FC<ImageWithTextCardProps> = ({
8
8
  imageSrc,
9
9
  imageAlt,
10
10
  title,
11
- activityTitle,
12
- activityText,
13
- detailsTitle,
14
- detailsText,
11
+ section1Title,
12
+ section1Text,
13
+ section2Title,
14
+ section2Text,
15
15
  buttonText,
16
16
  onButtonClick
17
17
  }) => {
@@ -36,13 +36,13 @@ const ImageWithTextCard: React.FC<ImageWithTextCardProps> = ({
36
36
  <h3 className="image-with-text__card__title">{title}</h3>
37
37
 
38
38
  <div className="image-with-text__card__description">
39
- <h5 className="image-with-text__card__description__title">{activityTitle}</h5>
40
- <p className="image-with-text__card__description__text">{activityText}</p>
39
+ <h5 className="image-with-text__card__description__title">{section1Title}</h5>
40
+ <p className="image-with-text__card__description__text">{section1Text}</p>
41
41
  </div>
42
42
 
43
43
  <div className="image-with-text__card__description">
44
- <h5 className="image-with-text__card__description__title">{detailsTitle}</h5>
45
- <p className="image-with-text__card__description__text">{detailsText}</p>
44
+ <h5 className="image-with-text__card__description__title">{section2Title}</h5>
45
+ <p className="image-with-text__card__description__text">{section2Text}</p>
46
46
  </div>
47
47
 
48
48
  <div className="image-with-text__card__btn">
@@ -5,16 +5,16 @@ export interface ImageWithTextSectionProps {
5
5
  }
6
6
 
7
7
  export interface ImageWithTextCardProps {
8
- noCard?: boolean;
9
- fullImage?: boolean;
10
- reverse?: boolean;
11
8
  imageSrc: string;
12
9
  imageAlt: string;
13
10
  title: string;
14
- activityTitle: string;
15
- activityText: string;
16
- detailsTitle: string;
17
- detailsText: string;
11
+ section1Title: string;
12
+ section1Text: string;
13
+ section2Title: string;
14
+ section2Text: string;
18
15
  buttonText: string;
19
16
  onButtonClick?: () => void;
17
+ noCard?: boolean;
18
+ fullImage?: boolean;
19
+ reverse?: boolean;
20
20
  }
@@ -100,6 +100,14 @@ const QSMContainer: React.FC = () => {
100
100
  // Filter out undefined fields before passing to addSearchFieldsToPayload
101
101
  const searchFields = [departureAirport, destinationAirport, returnAirport, destination].filter((field): field is BaseFieldConfig => field !== undefined);
102
102
  addSearchFieldsToPayload(payload, searchFields, qsmState);
103
+
104
+ if (destination) {
105
+ const option = destination.options.find((opt) => opt.value === qsmState[destination.fieldKey]);
106
+ if (option) {
107
+ payload.destinationType = option?.type;
108
+ }
109
+ }
110
+
103
111
  onSubmit(payload);
104
112
  console.log('Submitted QSM data:', payload);
105
113
  };