@taxbit/react-sdk 3.0.0-beta.0 → 3.0.0-beta.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/README.md CHANGED
@@ -130,6 +130,25 @@ If the `realTimeTinValidation` prop is set to `true`, the W-9 form will perform
130
130
 
131
131
  The date format can be set to `mdy` (month-day-year), `dmy` (day-month-year), or `ymd` (year-month-day). The default is `mdy`.
132
132
 
133
+ ### Adaptive Mode
134
+
135
+ Adaptive mode allows the questionnaire to intelligently skip steps and fields that already contain valid data, creating a more efficient user experience when updating or re-submitting tax documentation. The `adaptiveMode` prop accepts three values:
136
+
137
+ - `'full'` (default): Normal behavior with no skipping. All steps and fields are shown regardless of existing data.
138
+ - `'skipEdit'`: Skip steps and fields that contain valid data, but allow users to edit them from the summary screen. This provides a streamlined experience while maintaining full editing capability.
139
+ - `'skipLock'`: Skip steps and fields that contain valid data and lock them from editing. Only fields with missing or invalid data will be shown.
140
+
141
+ ```jsx
142
+ <TaxbitQuestionnaire
143
+ data={existingData}
144
+ bearerToken="bearer token goes here"
145
+ questionnaire="W-FORM"
146
+ adaptiveMode="skipEdit" // or "skipLock" or "full"
147
+ />
148
+ ```
149
+
150
+ Adaptive mode is particularly useful when users are updating their tax documentation or when you have pre-filled data from previous submissions. The component will automatically skip entire steps if all required fields on that step are valid, and within steps, it will hide fields that already have valid values.
151
+
133
152
  ### Region and Proxy Domain
134
153
 
135
154
  The `region` prop can be set to either `US` or `EU` to determine which regional server the component will connect to. The default is `US`. The `proxyDomain` prop can be set to a custom domain to route requests through a proxy server. This is useful in environments where direct access to the Taxbit servers is restricted. If not provided, the component will connect directly to the Taxbit servers based on the selected region.
@@ -357,6 +376,14 @@ type QuestionnaireType = 'DPS' | 'W-FORM' | 'SELF-CERT';
357
376
 
358
377
  ## Changelog
359
378
 
379
+ ### Version 3.0.0-beta.1
380
+
381
+ - Bug fix, DOM on summary screen in adaptive mode had extraneous div.
382
+
383
+ ### Version 3.0.0-beta.0
384
+
385
+ - Adaptive mode. W-Form support
386
+
360
387
  ### Version 2.5.0-beta.0
361
388
 
362
389
  - New support for country-specific TIN and VAT warnings.
@@ -4418,7 +4418,9 @@ const zl = le(pr).map((e) => ({
4418
4418
  ...e,
4419
4419
  label: e.value
4420
4420
  })), wl = le(
4421
- Ca
4421
+ Ca.filter(
4422
+ (e) => e !== "NON_REPORTING_FINANCIAL_INSTITUTION"
4423
+ )
4422
4424
  );
4423
4425
  le(
4424
4426
  hr
@@ -6143,7 +6145,7 @@ const xl = (e) => {
6143
6145
  RegardedOwnerTreatyClaims: "regardedOwnerTreatyClaims",
6144
6146
  RegardedOwnerUsTinValidation: "regardedOwnerUsTinValidation",
6145
6147
  Summary: "summary"
6146
- }, ud = "3.0.0-beta.0", Yi = (e) => e === "yes", F = (e) => e === void 0 ? void 0 : e === "yes", md = (e) => ({
6148
+ }, ud = "3.0.0-beta.1", Yi = (e) => e === "yes", F = (e) => e === void 0 ? void 0 : e === "yes", md = (e) => ({
6147
6149
  // 14
6148
6150
  isQiCertified: F(
6149
6151
  e.accountHolderIsQiCertified || e.regardedOwnerIsQiCertified
@@ -18631,7 +18633,7 @@ const x = ({ name: e }) => {
18631
18633
  }, [l, b, c, i, m, n]), /* @__PURE__ */ k("footer", { "aria-label": "Form Actions", className: "taxbit-footer", children: [
18632
18634
  R ? /* @__PURE__ */ t("div", { className: "taxbit-error-message", children: R }) : s ? /* @__PURE__ */ t("div", { className: "taxbit-info-message", children: s }) : null,
18633
18635
  /* @__PURE__ */ k("div", { className: "taxbit-step-actions", children: [
18634
- /* @__PURE__ */ k("div", { className: "taxbit-secondary-actions", children: [
18636
+ (e || o) && /* @__PURE__ */ k("div", { className: "taxbit-secondary-actions", children: [
18635
18637
  e && /* @__PURE__ */ t("button", { onClick: e, type: "button", className: "taxbit-button", children: I("back") }),
18636
18638
  o && /* @__PURE__ */ t("button", { onClick: o, type: "button", className: "taxbit-button", children: I("reset") })
18637
18639
  ] }),