@taxbit/react-sdk 0.6.1 → 0.6.2

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
@@ -226,72 +226,76 @@ type Progress = {
226
226
 
227
227
  ## Changelog
228
228
 
229
+ ### Version 0.6.1
230
+
231
+ 1. Moved Changelog file
232
+
229
233
  ### Version 0.6.0
230
234
 
231
- - Native local terms for languages
232
- - Moved "Remove Residence" button, added section action button
233
- - Fixed Type for onSubmit callback. Callback can be async or not async.
235
+ 1. Native local terms for languages
236
+ 2. Moved "Remove Residence" button, added section action button
237
+ 3. Fixed Type for onSubmit callback. Callback can be async or not async.
234
238
 
235
239
  ### Version 0.5.1
236
240
 
237
- - Place of Birth: Localized text update
238
- - Confirming valid ISO country code in data
239
- - Setting account holder name as the default value on Financial Account Identifier
241
+ 1. Place of Birth: Localized text update
242
+ 2. Confirming valid ISO country code in data
243
+ 3. Setting account holder name as the default value on Financial Account Identifier
240
244
 
241
245
  ### Version 0.5.0
242
246
 
243
- - Adding all error messages to Summary Screen
244
- - Submit button is disabled when saved data matches local data
245
- - Indicate in form footer when errors are in the form above
247
+ 1. Adding all error messages to Summary Screen
248
+ 2. Submit button is disabled when saved data matches local data
249
+ 3. Indicate in form footer when errors are in the form above
246
250
 
247
251
  ### Version 0.4.4
248
252
 
249
- - Handle blank bearer token. No error, but a warning is logged.
253
+ 1. Handle blank bearer token. No error, but a warning is logged.
250
254
 
251
255
  ### Version 0.4.3
252
256
 
253
- - Show error on VAT Identifier field when the Identifier is determined to be invalid
254
- - Fix: data should not reset on react render
255
- - Fix: changing data prop will reset form
257
+ 1. Show error on VAT Identifier field when the Identifier is determined to be invalid
258
+ 2. Fix: data should not reset on react render
259
+ 3. Fix: changing data prop will reset form
256
260
 
257
261
  ### Version 0.4.2
258
262
 
259
- - Added stepIndex and steps fields to the Progress object. stepId is now typed to potential enum values.
263
+ 1. Added stepIndex and steps fields to the Progress object. stepId is now typed to potential enum values.
260
264
 
261
265
  ### Version 0.4.1
262
266
 
263
- - Bug fix for onProgress callback not being triggered from the TaxBitDAC7Form component.
267
+ 1. Bug fix for onProgress callback not being triggered from the TaxBitDAC7Form component.
264
268
 
265
269
  ### Version 0.4.0
266
270
 
267
- - Added onProgress callback.
268
- - Showing multiple errors for DAC7 Tax residency when the case arises.
271
+ 1. Added onProgress callback.
272
+ 2. Showing multiple errors for DAC7 Tax residency when the case arises.
269
273
 
270
274
  ### Version 0.3.0
271
275
 
272
- - Added business registration questions to the form.
273
- - Added confirmation checkbox to the summary screen before submission.
276
+ 1. Added business registration questions to the form.
277
+ 2. Added confirmation checkbox to the summary screen before submission.
274
278
 
275
279
  ### Version 0.2.4
276
280
 
277
- - Bug fix for naming of CommonJS module exports.
281
+ 1. Bug fix for naming of CommonJS module exports.
278
282
 
279
283
  ### Version 0.2.3
280
284
 
281
- - Bug fix for the ClientTaxDocumentationStatus type not being accessible externally.
285
+ 1. Bug fix for the ClientTaxDocumentationStatus type not being accessible externally.
282
286
 
283
287
  ### Version 0.2.2
284
288
 
285
- - onSubmit and onSuccess callbacks are invoked with a parameter of type ClientTaxDocumentation which is now exposed.
289
+ 1. onSubmit and onSuccess callbacks are invoked with a parameter of type ClientTaxDocumentation which is now exposed.
286
290
 
287
291
  ### Version 0.2.1
288
292
 
289
- - The SDK now supports React versions 16, 17, and 18 and TypeScript versions 4 and 5.
293
+ 1. The SDK now supports React versions 16, 17, and 18 and TypeScript versions 4 and 5.
290
294
 
291
295
  ### Version 0.2.0
292
296
 
293
- - Fix in package.json to expose UMD module as main.
294
- - Added specific CSS class names for each question and each screen of the form.
295
- - Added the new status structure into the useTaxBit hook.
296
- - TaxBitDAC7Form component will now preload the form with previously submitted data.
297
- - Validation update to enforce that primary address country and tax residence country are the same.
297
+ 1. Fix in package.json to expose UMD module as main.
298
+ 2. Added specific CSS class names for each question and each screen of the form.
299
+ 3. Added the new status structure into the useTaxBit hook.
300
+ 4. TaxBitDAC7Form component will now preload the form with previously submitted data.
301
+ 5. Validation update to enforce that primary address country and tax residence country are the same.
@@ -1,5 +1,5 @@
1
1
  import type { ClientTaxDocumentation, ClientTaxDocumentationStatus } from '../../types/client';
2
- export declare const useTaxBit: (bearerToken: string, staging?: true) => {
2
+ export declare const useTaxBit: (bearerToken: string, staging?: boolean) => {
3
3
  postData: (data: ClientTaxDocumentation) => Promise<Response>;
4
4
  status: ClientTaxDocumentationStatus | undefined;
5
5
  formSubmitted: boolean;
@@ -5,7 +5,7 @@ type TaxBitResponseError = {
5
5
  };
6
6
  export type UseTaxBitFormProps = {
7
7
  data?: ClientTaxDocumentation;
8
- staging?: true;
8
+ staging?: boolean;
9
9
  bearerToken: string;
10
10
  onSuccess?: (data?: ClientTaxDocumentation) => void | Promise<void>;
11
11
  onSettled?: (data?: ClientTaxDocumentation) => void | Promise<void>;
@@ -748,7 +748,7 @@ const G = (e) => e === void 0 || e === "" || e === null, U = (e) => !G(e), Va =
748
748
  ei(n)
749
749
  ]
750
750
  )
751
- ), kr = "0.6.1", K = (e) => e === void 0 ? void 0 : e === "yes", vr = (e) => {
751
+ ), kr = "0.6.2", K = (e) => e === void 0 ? void 0 : e === "yes", vr = (e) => {
752
752
  const a = {
753
753
  city: e.accountHolderAddressCity,
754
754
  country: e.accountHolderAddressCountry,
@@ -1607,6 +1607,7 @@ const G = (e) => e === void 0 || e === "" || e === null, U = (e) => !G(e), Va =
1607
1607
  };
1608
1608
  return ee(() => {
1609
1609
  if (U(e)) {
1610
+ d(void 0);
1610
1611
  const A = {
1611
1612
  method: "GET",
1612
1613
  headers: Qa({ bearerToken: e })
@@ -20675,7 +20676,8 @@ const Or = {
20675
20676
  taxForms: o,
20676
20677
  complete: h,
20677
20678
  externalValidations: C
20678
- }
20679
+ },
20680
+ JSON.stringify(p) + e + r + (o == null ? void 0 : o.join(""))
20679
20681
  );
20680
20682
  }, gs = ({
20681
20683
  data: e,