@getspot/spot-widget-react 2.1.1 → 3.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @getspot/spot-widget-react
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - a7c82e3: Update to possible values of QuoteUpdates; Also, handle the yesOptionText replacement for spotPriceWithFees
8
+ - Updated dependencies [a7c82e3]
9
+ - @getspot/spot-widget@3.0.1
10
+
11
+ ## 3.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - c1cce5f: Add ability to override displayed price in onQuoteRetrieved callback
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [c1cce5f]
20
+ - @getspot/spot-widget@3.0.0
21
+
3
22
  ## 2.1.1
4
23
 
5
24
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { type SpotWidgetOptions, type SelectionData, type Quote } from "@getspot/spot-widget";
2
+ import { type SpotWidgetOptions, type SelectionData, type Quote, type QuoteUpdates } from "@getspot/spot-widget";
3
3
  /**
4
4
  * Props for the ReactSpotWidget component
5
5
  */
@@ -15,7 +15,7 @@ interface ReactSpotWidgetProps extends Omit<SpotWidgetOptions, 'location' | 'cal
15
15
  /** Theme customization options for styling the widget */
16
16
  theme?: SpotWidgetOptions['theme'];
17
17
  /** Callback fired when a quote is successfully retrieved */
18
- onQuoteRetrieved?: (quote: Quote) => void;
18
+ onQuoteRetrieved?: (quote: Quote) => QuoteUpdates | void;
19
19
  /** Callback fired when user opts in to the refund guarantee */
20
20
  onOptIn?: (data: SelectionData) => void;
21
21
  /** Callback fired when user opts out of the refund guarantee */
@@ -1 +1 @@
1
- {"version":3,"file":"ReactSpotWidget.d.ts","sourceRoot":"","sources":["../src/ReactSpotWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAClF,OAAmB,EAAE,KA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CAAC;IACxC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,iEAAiE;IACjE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,GAAG,CAAA;KAAE,KAAK,IAAI,CAAC;IACpF,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAE,KAAK,IAAI,CAAC;IAClE,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAClD,gDAAgD;IAChD,SAAS,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,6CAA6C;IAC7C,WAAW,EAAE,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9F,qCAAqC;IACrC,YAAY,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC;IACzC,kDAAkD;IAClD,iBAAiB,EAAE,MAAM,OAAO,CAAC;IACjC,yDAAyD;IACzD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,eAAe,iGAuFnB,CAAC;AAIH,eAAe,eAAe,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { type SpotWidgetOptions, type SelectionData, type Quote } from "@getspot/spot-widget";
2
+ import { type SpotWidgetOptions, type SelectionData, type Quote, type QuoteUpdates } from "@getspot/spot-widget";
3
3
  /**
4
4
  * Props for the ReactSpotWidget component
5
5
  */
@@ -15,7 +15,7 @@ interface ReactSpotWidgetProps extends Omit<SpotWidgetOptions, 'location' | 'cal
15
15
  /** Theme customization options for styling the widget */
16
16
  theme?: SpotWidgetOptions['theme'];
17
17
  /** Callback fired when a quote is successfully retrieved */
18
- onQuoteRetrieved?: (quote: Quote) => void;
18
+ onQuoteRetrieved?: (quote: Quote) => QuoteUpdates | void;
19
19
  /** Callback fired when user opts in to the refund guarantee */
20
20
  onOptIn?: (data: SelectionData) => void;
21
21
  /** Callback fired when user opts out of the refund guarantee */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getspot/spot-widget-react",
3
- "version": "2.1.1",
3
+ "version": "3.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -13,7 +13,7 @@
13
13
  "CHANGELOG.md"
14
14
  ],
15
15
  "dependencies": {
16
- "@getspot/spot-widget": "2.1.1"
16
+ "@getspot/spot-widget": "3.0.1"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "react": ">=18.0.0",