@taxbit/react-sdk 0.6.0 → 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
@@ -224,6 +224,78 @@ type Progress = {
224
224
  };
225
225
  ```
226
226
 
227
- ## Change Log
227
+ ## Changelog
228
228
 
229
- The Change log is available [here](CHANGELOG.md).
229
+ ### Version 0.6.1
230
+
231
+ 1. Moved Changelog file
232
+
233
+ ### Version 0.6.0
234
+
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.
238
+
239
+ ### Version 0.5.1
240
+
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
244
+
245
+ ### Version 0.5.0
246
+
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
250
+
251
+ ### Version 0.4.4
252
+
253
+ 1. Handle blank bearer token. No error, but a warning is logged.
254
+
255
+ ### Version 0.4.3
256
+
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
260
+
261
+ ### Version 0.4.2
262
+
263
+ 1. Added stepIndex and steps fields to the Progress object. stepId is now typed to potential enum values.
264
+
265
+ ### Version 0.4.1
266
+
267
+ 1. Bug fix for onProgress callback not being triggered from the TaxBitDAC7Form component.
268
+
269
+ ### Version 0.4.0
270
+
271
+ 1. Added onProgress callback.
272
+ 2. Showing multiple errors for DAC7 Tax residency when the case arises.
273
+
274
+ ### Version 0.3.0
275
+
276
+ 1. Added business registration questions to the form.
277
+ 2. Added confirmation checkbox to the summary screen before submission.
278
+
279
+ ### Version 0.2.4
280
+
281
+ 1. Bug fix for naming of CommonJS module exports.
282
+
283
+ ### Version 0.2.3
284
+
285
+ 1. Bug fix for the ClientTaxDocumentationStatus type not being accessible externally.
286
+
287
+ ### Version 0.2.2
288
+
289
+ 1. onSubmit and onSuccess callbacks are invoked with a parameter of type ClientTaxDocumentation which is now exposed.
290
+
291
+ ### Version 0.2.1
292
+
293
+ 1. The SDK now supports React versions 16, 17, and 18 and TypeScript versions 4 and 5.
294
+
295
+ ### Version 0.2.0
296
+
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.0", 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,