@gusto/embedded-react-sdk 0.51.2 → 0.52.0

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.
Files changed (213) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +1 -1
  3. package/dist/components/Common/OnboardingStatusBadge/index.d.ts +1 -1
  4. package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
  5. package/dist/components/Common/UI/FormBox/FormBox.d.ts +9 -0
  6. package/dist/components/Common/UI/FormBox/FormBox.js +13 -0
  7. package/dist/components/Common/UI/FormBox/FormBox.js.map +1 -0
  8. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js +14 -0
  9. package/dist/components/Common/UI/FormBox/FormBox.module.scss.js.map +1 -0
  10. package/dist/components/Common/UI/FormBox/FormBoxTypes.d.ts +26 -0
  11. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.d.ts +9 -0
  12. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js +23 -0
  13. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.js.map +1 -0
  14. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js +8 -0
  15. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeader.module.scss.js.map +1 -0
  16. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.d.ts +36 -0
  17. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js +7 -0
  18. package/dist/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js.map +1 -0
  19. package/dist/components/Common/UI/FormBoxHeader/index.d.ts +1 -0
  20. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -0
  21. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +1 -2
  23. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +1 -1
  24. package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +1 -1
  25. package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +1 -1
  26. package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.d.ts +1 -1
  27. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +1 -1
  28. package/dist/components/Company/Locations/LocationForm/Form.d.ts +1 -1
  29. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.d.ts +3 -3
  30. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +1 -1
  31. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +10 -1
  32. package/dist/components/Company/StateTaxes/StateTaxes.js +23 -17
  33. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  34. package/dist/components/Company/StateTaxes/StateTaxesComponents.d.ts +2 -0
  35. package/dist/components/Company/StateTaxes/StateTaxesComponents.js +17 -10
  36. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  37. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +26 -26
  38. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  39. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +9 -0
  40. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +24 -24
  41. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  42. package/dist/components/Contractor/Address/Address.d.ts +4 -3
  43. package/dist/components/Contractor/Address/Address.js.map +1 -1
  44. package/dist/components/Contractor/Address/shared/useContractorAddressForm/contractorAddressSchema.d.ts +2 -2
  45. package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.d.ts +1 -1
  46. package/dist/components/Contractor/ContractorList/index.js +95 -92
  47. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  48. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js +22 -19
  49. package/dist/components/Contractor/Documents/SignatureForm/SignatureForm.js.map +1 -1
  50. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/contractorSignatureFormSchema.d.ts +1 -1
  51. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/useContractorSignatureForm.d.ts +1 -1
  52. package/dist/components/Contractor/Documents/SignatureForm/useContractorSignatureForm/w9Fields.d.ts +1 -1
  53. package/dist/components/Contractor/PaymentMethod/shared/useContractorBankAccountForm/useContractorBankAccountFormSchema.d.ts +1 -1
  54. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.d.ts +1 -1
  55. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/contractorPaymentMethodSchema.js.map +1 -1
  56. package/dist/components/Contractor/PaymentMethod/shared/useContractorPaymentMethodForm/useContractorPaymentMethodForm.d.ts +2 -2
  57. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  58. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +1 -1
  59. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  60. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +2 -2
  61. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  62. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +17 -5
  63. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +32 -31
  64. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
  65. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +16 -4
  66. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +33 -29
  67. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  68. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +1 -1
  69. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.d.ts +1 -1
  70. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js +6 -6
  71. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/contractorDetailsSchema.js.map +1 -1
  72. package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.d.ts +1 -1
  73. package/dist/components/Employee/Compensation/onboarding/Compensation.d.ts +0 -4
  74. package/dist/components/Employee/Compensation/onboarding/Compensation.js +38 -42
  75. package/dist/components/Employee/Compensation/onboarding/Compensation.js.map +1 -1
  76. package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +2 -2
  77. package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +1 -1
  78. package/dist/components/Employee/Dashboard/index.d.ts +1 -1
  79. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +1 -1
  80. package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.d.ts +1 -1
  81. package/dist/components/Employee/Deductions/shared/useDeductionForm/deductionFormSchema.d.ts +2 -2
  82. package/dist/components/Employee/Documents/onboarding/DocumentSigner/EmploymentEligibility/EmploymentEligibilitySchema.d.ts +2 -2
  83. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +1 -4
  84. package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
  85. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +2 -2
  86. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js +27 -32
  87. package/dist/components/Employee/Documents/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
  88. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js +1 -2
  89. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -1
  90. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +2 -2
  91. package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +1 -1
  92. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.d.ts +1 -1
  93. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js +1 -3
  94. package/dist/components/Employee/OnboardingExecutionFlow/onboardingExecutionStateMachine.js.map +1 -1
  95. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +55 -49
  96. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  97. package/dist/components/Employee/PaymentMethod/shared/useBankForm/useBankFormSchema.d.ts +1 -1
  98. package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/useSplitPaymentsFormSchema.d.ts +1 -1
  99. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +2 -2
  100. package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +1 -1
  101. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +1 -1
  102. package/dist/components/Employee/exports/employeeManagement.d.ts +1 -1
  103. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +4 -5
  104. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +101 -125
  105. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  106. package/dist/components/InformationRequests/InformationRequestsComponents.d.ts +0 -5
  107. package/dist/components/InformationRequests/InformationRequestsComponents.js +12 -13
  108. package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -1
  109. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +4 -4
  110. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
  111. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +1 -1
  112. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +8 -8
  113. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  114. package/dist/components/Payroll/OffCycle/index.d.ts +1 -1
  115. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +1 -1
  116. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +97 -92
  117. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  118. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +2 -3
  119. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  120. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -2
  121. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +1 -1
  122. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  123. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +57 -56
  124. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  125. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  126. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +23 -6
  127. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +37 -33
  128. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  129. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +2 -2
  130. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +6 -6
  131. package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
  132. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +1 -1
  133. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  134. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +1 -1
  135. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  136. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  137. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -1
  138. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +1 -1
  139. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  140. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -1
  141. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +31 -31
  142. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  143. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +9 -5
  144. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  145. package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -1
  146. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +1 -1
  147. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
  148. package/dist/components/Payroll/Transition/index.d.ts +1 -1
  149. package/dist/components/Payroll/helpers.d.ts +22 -8
  150. package/dist/components/Payroll/helpers.js +1 -1
  151. package/dist/components/Payroll/helpers.js.map +1 -1
  152. package/dist/components/Payroll/index.d.ts +3 -2
  153. package/dist/components/Payroll/payrollTypes.d.ts +1 -1
  154. package/dist/components/Payroll/payrollTypes.js +1 -1
  155. package/dist/components/Payroll/payrollTypes.js.map +1 -1
  156. package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
  157. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  158. package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +1 -1
  159. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +19 -19
  160. package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
  161. package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -5
  162. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  163. package/dist/contexts/ApiProvider/apiVersion.d.ts +2 -2
  164. package/dist/contexts/ApiProvider/apiVersion.js +1 -1
  165. package/dist/contexts/ApiProvider/apiVersion.js.map +1 -1
  166. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +40 -36
  167. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  168. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +2 -0
  169. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
  170. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +18 -16
  171. package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
  172. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +6 -0
  173. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  174. package/dist/contexts/GustoProvider/GustoProvider.d.ts +4 -5
  175. package/dist/contexts/GustoProvider/GustoProvider.js +6 -6
  176. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  177. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +7 -7
  178. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +8 -8
  179. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  180. package/dist/contexts/GustoProvider/index.d.ts +1 -1
  181. package/dist/contexts/index.d.ts +2 -6
  182. package/dist/i18n/en/Contractor.ContractorList.json.js +18 -16
  183. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  184. package/dist/i18n/en/Contractor.SignatureForm.json.js +5 -5
  185. package/dist/i18n/en/Employee.OnboardingSummary.json.js +24 -20
  186. package/dist/i18n/en/Employee.OnboardingSummary.json.js.map +1 -1
  187. package/dist/i18n/types.d.ts +8 -0
  188. package/dist/index.d.ts +8 -7
  189. package/dist/index.js +121 -134
  190. package/dist/index.js.map +1 -1
  191. package/dist/models/WA_RISK_CODES.d.ts +5 -2
  192. package/dist/models/WA_RISK_CODES.js.map +1 -1
  193. package/dist/models/external.d.ts +67 -57
  194. package/dist/partner-hook-utils/composeErrorHandler.d.ts +9 -4
  195. package/dist/partner-hook-utils/composeErrorHandler.js.map +1 -1
  196. package/dist/partner-hook-utils/form/SDKFormProvider.d.ts +10 -2
  197. package/dist/partner-hook-utils/form/SDKFormProvider.js +7 -1
  198. package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
  199. package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +7 -4
  200. package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
  201. package/dist/partner-hook-utils/form/fields/index.d.ts +1 -0
  202. package/dist/partner-hook-utils/form/index.d.ts +3 -3
  203. package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -1
  204. package/dist/partner-hook-utils/index.d.ts +1 -1
  205. package/dist/partner-hook-utils/types.d.ts +7 -3
  206. package/dist/shared/constants.d.ts +2 -2
  207. package/dist/shared/constants.js +4 -4
  208. package/dist/shared/constants.js.map +1 -1
  209. package/dist/style.css +1 -1
  210. package/dist/types/Helpers.d.ts +11 -0
  211. package/dist/types/hooks.d.ts +1 -1
  212. package/docs/guides/endpoint-inventory.json +379 -379
  213. package/package.json +7 -7
@@ -1,11 +1,11 @@
1
1
  import { useState as x, useMemo as M, useCallback as f } from "react";
2
2
  import { useEmployeesListSuspense as R, buildEmployeesListQuery as _ } from "@gusto/embedded-api/react-query/employeesList";
3
- import { useGustoEmbeddedContext as L } from "@gusto/embedded-api/react-query/_context";
4
- import { useSuspenseQueries as T } from "@tanstack/react-query";
5
- import { Include as h } from "@gusto/embedded-api/models/operations/getv1companiescompanyidemployees";
6
- import { useClientPagination as I } from "../../../../hooks/useClientPagination/useClientPagination.js";
3
+ import { useGustoEmbeddedContext as I } from "@gusto/embedded-api/react-query/_context";
4
+ import { useSuspenseQueries as L } from "@tanstack/react-query";
5
+ import { GetV1CompaniesCompanyIdEmployeesQueryParamInclude as h } from "@gusto/embedded-api/models/operations/getv1companiescompanyidemployees";
6
+ import { useClientPagination as T } from "../../../../hooks/useClientPagination/useClientPagination.js";
7
7
  const g = 100;
8
- function O(t) {
8
+ function G(t) {
9
9
  if (!t) return !1;
10
10
  const n = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
11
11
  return t <= n;
@@ -14,16 +14,16 @@ function S(t, n) {
14
14
  return `${t.firstName ?? ""} ${t.lastName ?? ""} ${t.department ?? ""}`.toLowerCase().includes(n.toLowerCase());
15
15
  }
16
16
  function k(t, n) {
17
- const E = L(), [y, m] = x(() => /* @__PURE__ */ new Set()), { data: l, isFetching: b } = R({
17
+ const y = I(), [E, c] = x(() => /* @__PURE__ */ new Set()), { data: l, isFetching: C } = R({
18
18
  companyId: t,
19
19
  terminated: !1,
20
20
  page: 1,
21
21
  per: g,
22
22
  include: [h.AllCompensations]
23
- }), C = Number(l.httpMeta.response.headers.get("x-total-pages") ?? 1), u = T({
23
+ }), b = Number(l.httpMeta.response.headers.get("x-total-pages") ?? 1), u = L({
24
24
  queries: Array.from(
25
- { length: Math.max(0, C - 1) },
26
- (s, e) => _(E, {
25
+ { length: Math.max(0, b - 1) },
26
+ (s, e) => _(y, {
27
27
  companyId: t,
28
28
  terminated: !1,
29
29
  page: e + 2,
@@ -34,7 +34,7 @@ function k(t, n) {
34
34
  }), o = M(() => [
35
35
  ...l.showEmployees ?? [],
36
36
  ...u.flatMap((e) => e.data.showEmployees ?? [])
37
- ].filter((e) => O((e.jobs?.find((a) => a.primary) ?? e.jobs?.[0])?.hireDate)).filter((e) => !n?.has(e.uuid)).map((e) => ({
37
+ ].filter((e) => G((e.jobs?.find((a) => a.primary) ?? e.jobs?.[0])?.hireDate)).filter((e) => !n?.has(e.uuid)).map((e) => ({
38
38
  uuid: e.uuid,
39
39
  firstName: e.firstName,
40
40
  lastName: e.lastName,
@@ -46,22 +46,22 @@ function k(t, n) {
46
46
  pagination: w,
47
47
  searchValue: r,
48
48
  actions: d
49
- } = I(o, {
49
+ } = T(o, {
50
50
  searchPredicate: S,
51
51
  defaultItemsPerPage: 25
52
- }), A = u.some((s) => s.isFetching), N = b || A, F = f((s, e) => {
53
- m((a) => {
52
+ }), A = u.some((s) => s.isFetching), N = C || A, F = f((s, e) => {
53
+ c((a) => {
54
54
  const i = new Set(a);
55
55
  return e ? i.add(s.uuid) : i.delete(s.uuid), i;
56
56
  });
57
57
  }, []), j = f(
58
58
  (s, e) => {
59
59
  const a = r ? o.filter((i) => S(i, r)) : o;
60
- m((i) => {
61
- const c = new Set(i);
60
+ c((i) => {
61
+ const m = new Set(i);
62
62
  for (const p of a)
63
- s ? c.add(p.uuid) : c.delete(p.uuid);
64
- return c;
63
+ s ? m.add(p.uuid) : m.delete(p.uuid);
64
+ return m;
65
65
  });
66
66
  },
67
67
  [o, r]
@@ -70,7 +70,7 @@ function k(t, n) {
70
70
  filteredEmployees: P,
71
71
  eligibleEmployees: o,
72
72
  eligibleCount: o.length,
73
- selectedUuids: y,
73
+ selectedUuids: E,
74
74
  searchValue: r,
75
75
  pagination: w,
76
76
  isFetching: N,
@@ -81,7 +81,7 @@ function k(t, n) {
81
81
  };
82
82
  }
83
83
  export {
84
- O as isStartedByToday,
84
+ G as isStartedByToday,
85
85
  S as matchesEmployeeSearch,
86
86
  k as useSelectEmployeesData
87
87
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useSelectEmployeesData.js","sources":["../../../../../src/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.ts"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react'\nimport {\n buildEmployeesListQuery,\n useEmployeesListSuspense,\n} from '@gusto/embedded-api/react-query/employeesList'\nimport { useGustoEmbeddedContext } from '@gusto/embedded-api/react-query/_context'\nimport { useSuspenseQueries } from '@tanstack/react-query'\nimport { Include } from '@gusto/embedded-api/models/operations/getv1companiescompanyidemployees'\nimport type { PaidTimeOff } from '@gusto/embedded-api/models/components/paidtimeoff'\nimport type { EmployeeItem } from './SelectEmployeesPresentationTypes'\nimport { useClientPagination } from '@/hooks/useClientPagination/useClientPagination'\n\nconst SERVER_MAX_PER_PAGE = 100\n\n// Employees whose primary job's hire_date is in the future are rejected by\n// `POST /time_off_policies/:uuid/add_employees` as \"ineligible\" with no\n// per-uuid reason in the response. We can detect this from the employees\n// list response, so we drop them client-side to prevent the error.\n/** @internal */\nexport function isStartedByToday(hireDate: string | undefined): boolean {\n if (!hireDate) return false\n const today = new Date().toISOString().slice(0, 10)\n return hireDate <= today\n}\n\n// Single source of truth for the search predicate so the client-pagination\n// hook and the select-all handler agree on what's \"in scope\" for a query.\n/** @internal */\nexport function matchesEmployeeSearch(employee: EmployeeItem, query: string): boolean {\n return `${employee.firstName ?? ''} ${employee.lastName ?? ''} ${employee.department ?? ''}`\n .toLowerCase()\n .includes(query.toLowerCase())\n}\n\n/** @internal */\nexport function useSelectEmployeesData(companyId: string, excludeUuids?: Set<string>) {\n const gustoClient = useGustoEmbeddedContext()\n const [selectedUuids, setSelectedUuids] = useState<Set<string>>(() => new Set())\n\n // Fetch the full employees list up front so filter, search, and pagination\n // can all be applied client-side. include: all_compensations is required to\n // populate eligiblePaidTimeOff, which carries each employee's current\n // balance on their existing time-off policies — used to pre-fill carry-over\n // balances for selection.\n const { data: firstPage, isFetching: isFirstPageFetching } = useEmployeesListSuspense({\n companyId,\n terminated: false,\n page: 1,\n per: SERVER_MAX_PER_PAGE,\n include: [Include.AllCompensations],\n })\n\n const totalServerPages = Number(firstPage.httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n // For each additional server page we fire a suspense query in parallel.\n // No explicit concurrency cap: typical embedded customers are <100\n // employees (one server page, zero extra requests). For larger companies\n // the browser's per-origin connection limit (~6) acts as the natural\n // ceiling. If this flow ever needs to support thousands of employees,\n // reconsider — either a server-side eligibility filter or a paginated\n // fetch-as-you-scroll strategy would be the right escape hatches.\n const restPageResults = useSuspenseQueries({\n queries: Array.from({ length: Math.max(0, totalServerPages - 1) }, (_, i) =>\n buildEmployeesListQuery(gustoClient, {\n companyId,\n terminated: false,\n page: i + 2,\n per: SERVER_MAX_PER_PAGE,\n include: [Include.AllCompensations],\n }),\n ),\n })\n\n const eligibleEmployees = useMemo<EmployeeItem[]>(() => {\n const showEmployees = [\n ...(firstPage.showEmployees ?? []),\n ...restPageResults.flatMap(r => r.data.showEmployees ?? []),\n ]\n return showEmployees\n .filter(e => isStartedByToday((e.jobs?.find(job => job.primary) ?? e.jobs?.[0])?.hireDate))\n .filter(e => !excludeUuids?.has(e.uuid))\n .map(e => ({\n uuid: e.uuid,\n firstName: e.firstName,\n lastName: e.lastName,\n jobTitle: e.jobs?.find(job => job.primary)?.title ?? e.jobs?.[0]?.title ?? null,\n department: e.department ?? null,\n eligiblePaidTimeOff: e.eligiblePaidTimeOff as PaidTimeOff[] | undefined,\n }))\n }, [firstPage.showEmployees, restPageResults, excludeUuids])\n\n const {\n data: filteredEmployees,\n pagination,\n searchValue,\n actions: paginationActions,\n } = useClientPagination(eligibleEmployees, {\n searchPredicate: matchesEmployeeSearch,\n defaultItemsPerPage: 25,\n })\n\n const isRestFetching = restPageResults.some(r => r.isFetching)\n const isFetching = isFirstPageFetching || isRestFetching\n\n const handleSelect = useCallback((item: EmployeeItem, checked: boolean) => {\n setSelectedUuids(prev => {\n const next = new Set(prev)\n if (checked) next.add(item.uuid)\n else next.delete(item.uuid)\n return next\n })\n }, [])\n\n // Select-all scopes to the full search-filtered list (every page), not just\n // the rendered page slice that DataView passes in. This matches the user\n // expectation that \"select all\" actually means \"all\" — including any\n // employees the current pagination has scrolled off-screen. The second\n // argument from DataView (the visible page slice) is intentionally ignored.\n const handleSelectAll = useCallback(\n (checked: boolean, _visibleItems?: EmployeeItem[]) => {\n const scope = searchValue\n ? eligibleEmployees.filter(employee => matchesEmployeeSearch(employee, searchValue))\n : eligibleEmployees\n setSelectedUuids(prev => {\n const next = new Set(prev)\n for (const item of scope) {\n if (checked) next.add(item.uuid)\n else next.delete(item.uuid)\n }\n return next\n })\n },\n [eligibleEmployees, searchValue],\n )\n\n return {\n filteredEmployees,\n eligibleEmployees,\n eligibleCount: eligibleEmployees.length,\n selectedUuids,\n searchValue,\n pagination,\n isFetching,\n handleSelect,\n handleSelectAll,\n handleSearchChange: paginationActions.onSearchChange,\n handleSearchClear: paginationActions.onSearchClear,\n }\n}\n"],"names":["SERVER_MAX_PER_PAGE","isStartedByToday","hireDate","today","matchesEmployeeSearch","employee","query","useSelectEmployeesData","companyId","excludeUuids","gustoClient","useGustoEmbeddedContext","selectedUuids","setSelectedUuids","useState","firstPage","isFirstPageFetching","useEmployeesListSuspense","Include","totalServerPages","restPageResults","useSuspenseQueries","_","i","buildEmployeesListQuery","eligibleEmployees","useMemo","r","job","filteredEmployees","pagination","searchValue","paginationActions","useClientPagination","isRestFetching","isFetching","handleSelect","useCallback","item","checked","prev","next","handleSelectAll","_visibleItems","scope"],"mappings":";;;;;;AAYA,MAAMA,IAAsB;AAOrB,SAASC,EAAiBC,GAAuC;AACtE,MAAI,CAACA,EAAU,QAAO;AACtB,QAAMC,yBAAY,KAAA,GAAO,cAAc,MAAM,GAAG,EAAE;AAClD,SAAOD,KAAYC;AACrB;AAKO,SAASC,EAAsBC,GAAwBC,GAAwB;AACpF,SAAO,GAAGD,EAAS,aAAa,EAAE,IAAIA,EAAS,YAAY,EAAE,IAAIA,EAAS,cAAc,EAAE,GACvF,YAAA,EACA,SAASC,EAAM,aAAa;AACjC;AAGO,SAASC,EAAuBC,GAAmBC,GAA4B;AACpF,QAAMC,IAAcC,EAAA,GACd,CAACC,GAAeC,CAAgB,IAAIC,EAAsB,MAAM,oBAAI,KAAK,GAOzE,EAAE,MAAMC,GAAW,YAAYC,EAAA,IAAwBC,EAAyB;AAAA,IACpF,WAAAT;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,KAAKR;AAAA,IACL,SAAS,CAACkB,EAAQ,gBAAgB;AAAA,EAAA,CACnC,GAEKC,IAAmB,OAAOJ,EAAU,SAAS,SAAS,QAAQ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AKA,EAAE,UAAU,GACvDQ,IAAanB,KAAuBkB,GAEpCE,IAAeC,EAAY,CAACC,GAAoBC,MAAqB;AACzE,IAAA1B,EAAiB,CAAA2B,MAAQ;AACvB,YAAMC,IAAO,IAAI,IAAID,CAAI;AACzB,aAAID,IAASE,EAAK,IAAIH,EAAK,IAAI,IAC1BG,EAAK,OAAOH,EAAK,IAAI,GACnBG;AAAA,IACT,CAAC;AAAA,EACH,GAAG,CAAA,CAAE,GAOCC,IAAkBL;AAAA,IACtB,CAACE,GAAkBI,MAAmC;AACpD,YAAMC,IAAQb,IACVN,EAAkB,OAAO,OAAYrB,EAAsBC,GAAU0B,CAAW,CAAC,IACjFN;AACJ,MAAAZ,EAAiB,CAAA2B,MAAQ;AACvB,cAAMC,IAAO,IAAI,IAAID,CAAI;AACzB,mBAAWF,KAAQM;AACjB,UAAIL,IAASE,EAAK,IAAIH,EAAK,IAAI,IAC1BG,EAAK,OAAOH,EAAK,IAAI;AAE5B,eAAOG;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,CAAChB,GAAmBM,CAAW;AAAA,EAAA;AAGjC,SAAO;AAAA,IACL,mBAAAF;AAAA,IACA,mBAAAJ;AAAA,IACA,eAAeA,EAAkB;AAAA,IACjC,eAAAb;AAAA,IACA,aAAAmB;AAAA,IACA,YAAAD;AAAA,IACA,YAAAK;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAM;AAAA,IACA,oBAAoBV,EAAkB;AAAA,IACtC,mBAAmBA,EAAkB;AAAA,EAAA;AAEzC;"}
1
+ {"version":3,"file":"useSelectEmployeesData.js","sources":["../../../../../src/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.ts"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react'\nimport {\n buildEmployeesListQuery,\n useEmployeesListSuspense,\n} from '@gusto/embedded-api/react-query/employeesList'\nimport { useGustoEmbeddedContext } from '@gusto/embedded-api/react-query/_context'\nimport { useSuspenseQueries } from '@tanstack/react-query'\nimport { GetV1CompaniesCompanyIdEmployeesQueryParamInclude as Include } from '@gusto/embedded-api/models/operations/getv1companiescompanyidemployees'\nimport type { PaidTimeOff } from '@gusto/embedded-api/models/components/paidtimeoff'\nimport type { EmployeeItem } from './SelectEmployeesPresentationTypes'\nimport { useClientPagination } from '@/hooks/useClientPagination/useClientPagination'\n\nconst SERVER_MAX_PER_PAGE = 100\n\n// Employees whose primary job's hire_date is in the future are rejected by\n// `POST /time_off_policies/:uuid/add_employees` as \"ineligible\" with no\n// per-uuid reason in the response. We can detect this from the employees\n// list response, so we drop them client-side to prevent the error.\n/** @internal */\nexport function isStartedByToday(hireDate: string | undefined): boolean {\n if (!hireDate) return false\n const today = new Date().toISOString().slice(0, 10)\n return hireDate <= today\n}\n\n// Single source of truth for the search predicate so the client-pagination\n// hook and the select-all handler agree on what's \"in scope\" for a query.\n/** @internal */\nexport function matchesEmployeeSearch(employee: EmployeeItem, query: string): boolean {\n return `${employee.firstName ?? ''} ${employee.lastName ?? ''} ${employee.department ?? ''}`\n .toLowerCase()\n .includes(query.toLowerCase())\n}\n\n/** @internal */\nexport function useSelectEmployeesData(companyId: string, excludeUuids?: Set<string>) {\n const gustoClient = useGustoEmbeddedContext()\n const [selectedUuids, setSelectedUuids] = useState<Set<string>>(() => new Set())\n\n // Fetch the full employees list up front so filter, search, and pagination\n // can all be applied client-side. include: all_compensations is required to\n // populate eligiblePaidTimeOff, which carries each employee's current\n // balance on their existing time-off policies — used to pre-fill carry-over\n // balances for selection.\n const { data: firstPage, isFetching: isFirstPageFetching } = useEmployeesListSuspense({\n companyId,\n terminated: false,\n page: 1,\n per: SERVER_MAX_PER_PAGE,\n include: [Include.AllCompensations],\n })\n\n const totalServerPages = Number(firstPage.httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n // For each additional server page we fire a suspense query in parallel.\n // No explicit concurrency cap: typical embedded customers are <100\n // employees (one server page, zero extra requests). For larger companies\n // the browser's per-origin connection limit (~6) acts as the natural\n // ceiling. If this flow ever needs to support thousands of employees,\n // reconsider — either a server-side eligibility filter or a paginated\n // fetch-as-you-scroll strategy would be the right escape hatches.\n const restPageResults = useSuspenseQueries({\n queries: Array.from({ length: Math.max(0, totalServerPages - 1) }, (_, i) =>\n buildEmployeesListQuery(gustoClient, {\n companyId,\n terminated: false,\n page: i + 2,\n per: SERVER_MAX_PER_PAGE,\n include: [Include.AllCompensations],\n }),\n ),\n })\n\n const eligibleEmployees = useMemo<EmployeeItem[]>(() => {\n const showEmployees = [\n ...(firstPage.showEmployees ?? []),\n ...restPageResults.flatMap(r => r.data.showEmployees ?? []),\n ]\n return showEmployees\n .filter(e => isStartedByToday((e.jobs?.find(job => job.primary) ?? e.jobs?.[0])?.hireDate))\n .filter(e => !excludeUuids?.has(e.uuid))\n .map(e => ({\n uuid: e.uuid,\n firstName: e.firstName,\n lastName: e.lastName,\n jobTitle: e.jobs?.find(job => job.primary)?.title ?? e.jobs?.[0]?.title ?? null,\n department: e.department ?? null,\n eligiblePaidTimeOff: e.eligiblePaidTimeOff as PaidTimeOff[] | undefined,\n }))\n }, [firstPage.showEmployees, restPageResults, excludeUuids])\n\n const {\n data: filteredEmployees,\n pagination,\n searchValue,\n actions: paginationActions,\n } = useClientPagination(eligibleEmployees, {\n searchPredicate: matchesEmployeeSearch,\n defaultItemsPerPage: 25,\n })\n\n const isRestFetching = restPageResults.some(r => r.isFetching)\n const isFetching = isFirstPageFetching || isRestFetching\n\n const handleSelect = useCallback((item: EmployeeItem, checked: boolean) => {\n setSelectedUuids(prev => {\n const next = new Set(prev)\n if (checked) next.add(item.uuid)\n else next.delete(item.uuid)\n return next\n })\n }, [])\n\n // Select-all scopes to the full search-filtered list (every page), not just\n // the rendered page slice that DataView passes in. This matches the user\n // expectation that \"select all\" actually means \"all\" — including any\n // employees the current pagination has scrolled off-screen. The second\n // argument from DataView (the visible page slice) is intentionally ignored.\n const handleSelectAll = useCallback(\n (checked: boolean, _visibleItems?: EmployeeItem[]) => {\n const scope = searchValue\n ? eligibleEmployees.filter(employee => matchesEmployeeSearch(employee, searchValue))\n : eligibleEmployees\n setSelectedUuids(prev => {\n const next = new Set(prev)\n for (const item of scope) {\n if (checked) next.add(item.uuid)\n else next.delete(item.uuid)\n }\n return next\n })\n },\n [eligibleEmployees, searchValue],\n )\n\n return {\n filteredEmployees,\n eligibleEmployees,\n eligibleCount: eligibleEmployees.length,\n selectedUuids,\n searchValue,\n pagination,\n isFetching,\n handleSelect,\n handleSelectAll,\n handleSearchChange: paginationActions.onSearchChange,\n handleSearchClear: paginationActions.onSearchClear,\n }\n}\n"],"names":["SERVER_MAX_PER_PAGE","isStartedByToday","hireDate","today","matchesEmployeeSearch","employee","query","useSelectEmployeesData","companyId","excludeUuids","gustoClient","useGustoEmbeddedContext","selectedUuids","setSelectedUuids","useState","firstPage","isFirstPageFetching","useEmployeesListSuspense","Include","totalServerPages","restPageResults","useSuspenseQueries","_","i","buildEmployeesListQuery","eligibleEmployees","useMemo","r","job","filteredEmployees","pagination","searchValue","paginationActions","useClientPagination","isRestFetching","isFetching","handleSelect","useCallback","item","checked","prev","next","handleSelectAll","_visibleItems","scope"],"mappings":";;;;;;AAYA,MAAMA,IAAsB;AAOrB,SAASC,EAAiBC,GAAuC;AACtE,MAAI,CAACA,EAAU,QAAO;AACtB,QAAMC,yBAAY,KAAA,GAAO,cAAc,MAAM,GAAG,EAAE;AAClD,SAAOD,KAAYC;AACrB;AAKO,SAASC,EAAsBC,GAAwBC,GAAwB;AACpF,SAAO,GAAGD,EAAS,aAAa,EAAE,IAAIA,EAAS,YAAY,EAAE,IAAIA,EAAS,cAAc,EAAE,GACvF,YAAA,EACA,SAASC,EAAM,aAAa;AACjC;AAGO,SAASC,EAAuBC,GAAmBC,GAA4B;AACpF,QAAMC,IAAcC,EAAA,GACd,CAACC,GAAeC,CAAgB,IAAIC,EAAsB,MAAM,oBAAI,KAAK,GAOzE,EAAE,MAAMC,GAAW,YAAYC,EAAA,IAAwBC,EAAyB;AAAA,IACpF,WAAAT;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AAAC;AAAA,IACA,SAASC;AAAA,EAAA,IACPC,EAAoBR,GAAmB;AAAA,IACzC,iBAAiBrB;AAAA,IACjB,qBAAqB;AAAA,EAAA,CACtB,GAEK8B,IAAiBd,EAAgB,KAAK,CAAAO,MAAKA,EAAE,UAAU,GACvDQ,IAAanB,KAAuBkB,GAEpCE,IAAeC,EAAY,CAACC,GAAoBC,MAAqB;AACzE,IAAA1B,EAAiB,CAAA2B,MAAQ;AACvB,YAAMC,IAAO,IAAI,IAAID,CAAI;AACzB,aAAID,IAASE,EAAK,IAAIH,EAAK,IAAI,IAC1BG,EAAK,OAAOH,EAAK,IAAI,GACnBG;AAAA,IACT,CAAC;AAAA,EACH,GAAG,CAAA,CAAE,GAOCC,IAAkBL;AAAA,IACtB,CAACE,GAAkBI,MAAmC;AACpD,YAAMC,IAAQb,IACVN,EAAkB,OAAO,OAAYrB,EAAsBC,GAAU0B,CAAW,CAAC,IACjFN;AACJ,MAAAZ,EAAiB,CAAA2B,MAAQ;AACvB,cAAMC,IAAO,IAAI,IAAID,CAAI;AACzB,mBAAWF,KAAQM;AACjB,UAAIL,IAASE,EAAK,IAAIH,EAAK,IAAI,IAC1BG,EAAK,OAAOH,EAAK,IAAI;AAE5B,eAAOG;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,CAAChB,GAAmBM,CAAW;AAAA,EAAA;AAGjC,SAAO;AAAA,IACL,mBAAAF;AAAA,IACA,mBAAAJ;AAAA,IACA,eAAeA,EAAkB;AAAA,IACjC,eAAAb;AAAA,IACA,aAAAmB;AAAA,IACA,YAAAD;AAAA,IACA,YAAAK;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAM;AAAA,IACA,oBAAoBV,EAAkB;AAAA,IACtC,mBAAmBA,EAAkB;AAAA,EAAA;AAEzC;"}
@@ -3,10 +3,10 @@ import { SDKHooks } from '../../types/hooks';
3
3
  /**
4
4
  * Props for {@link ApiProvider}.
5
5
  *
6
- * @public
6
+ * @internal
7
7
  */
8
8
  export interface ApiProviderProps {
9
- /** Base URL the SDK uses for all `@gusto/embedded-api-v-2026-02-01` requests. */
9
+ /** Base URL the SDK uses for all `@gusto/embedded-api-v-2026-06-15` requests. */
10
10
  url: string;
11
11
  /** Default headers applied to every SDK request, in addition to the `X-Gusto-API-Version` header set automatically. */
12
12
  headers?: HeadersInit;
@@ -18,13 +18,13 @@ export interface ApiProviderProps {
18
18
  queryClient?: QueryClient;
19
19
  }
20
20
  /**
21
- * Wires the `@gusto/embedded-api-v-2026-02-01` client and a React Query client into the React tree.
21
+ * Wires the `@gusto/embedded-api-v-2026-06-15` client and a React Query client into the React tree.
22
22
  *
23
23
  * @remarks
24
24
  * Registers the SDK's `X-Gusto-API-Version` header on every request, applies any default `headers`,
25
25
  * and registers user-supplied lifecycle hooks (`beforeCreateRequest`, `beforeRequest`, `afterSuccess`,
26
26
  * `afterError`). When no `queryClient` is supplied, one is created with the SDK's defaults so
27
- * successful mutations under the `['@gusto/embedded-api-v-2026-02-01']` key invalidate every SDK
27
+ * successful mutations under the `['@gusto/embedded-api-v-2026-06-15']` key invalidate every SDK
28
28
  * query automatically. Partners who supply their own `QueryClient` are responsible for matching that
29
29
  * contract.
30
30
  *
@@ -33,6 +33,6 @@ export interface ApiProviderProps {
33
33
  *
34
34
  * @param props - See {@link ApiProviderProps}.
35
35
  * @returns A React subtree wrapped in `QueryClientProvider` and the embedded API context.
36
- * @public
36
+ * @internal
37
37
  */
38
38
  export declare function ApiProvider({ url, headers, hooks, children, queryClient: queryClientFromProps, }: ApiProviderProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import { QueryClientProvider, type QueryClient } from '@tanstack/react-query'\nimport { GustoEmbeddedProvider } from '@gusto/embedded-api/react-query/_context'\nimport { GustoEmbeddedCore } from '@gusto/embedded-api/core'\nimport { SDKHooks as NativeSDKHooks } from '@gusto/embedded-api/hooks/hooks'\nimport { useMemo } from 'react'\nimport { apiVersionHook } from './apiVersionHook'\nimport { createSdkQueryClient } from './createSdkQueryClient'\nimport type { SDKHooks, BeforeRequestHook } from '@/types/hooks'\n\n/**\n * Props for {@link ApiProvider}.\n *\n * @public\n */\nexport interface ApiProviderProps {\n /** Base URL the SDK uses for all `@gusto/embedded-api-v-2026-02-01` requests. */\n url: string\n /** Default headers applied to every SDK request, in addition to the `X-Gusto-API-Version` header set automatically. */\n headers?: HeadersInit\n /** Lifecycle hooks for intercepting and modifying SDK requests and responses. */\n hooks?: SDKHooks\n /** Subtree that renders inside the API + React Query providers. */\n children: React.ReactNode\n /** Optional React Query client. When omitted, a client is created with the SDK's defaults (auto-invalidation on mutation success). */\n queryClient?: QueryClient\n}\n\n/**\n * Wires the `@gusto/embedded-api-v-2026-02-01` client and a React Query client into the React tree.\n *\n * @remarks\n * Registers the SDK's `X-Gusto-API-Version` header on every request, applies any default `headers`,\n * and registers user-supplied lifecycle hooks (`beforeCreateRequest`, `beforeRequest`, `afterSuccess`,\n * `afterError`). When no `queryClient` is supplied, one is created with the SDK's defaults so\n * successful mutations under the `['@gusto/embedded-api-v-2026-02-01']` key invalidate every SDK\n * query automatically. Partners who supply their own `QueryClient` are responsible for matching that\n * contract.\n *\n * Typically wrapped by {@link GustoProvider}; use directly only when composing the provider stack\n * manually.\n *\n * @param props - See {@link ApiProviderProps}.\n * @returns A React subtree wrapped in `QueryClientProvider` and the embedded API context.\n * @public\n */\nexport function ApiProvider({\n url,\n headers,\n hooks,\n children,\n queryClient: queryClientFromProps,\n}: ApiProviderProps) {\n const gustoClient = useMemo(() => {\n const client = new GustoEmbeddedCore({\n serverURL: url,\n })\n\n const sdkHooks = client._options.hooks || new NativeSDKHooks()\n\n sdkHooks.registerBeforeRequestHook(apiVersionHook)\n\n if (headers) {\n const defaultHeaderHook: BeforeRequestHook = {\n beforeRequest: (context, request) => {\n const headersInstance = new Headers(headers)\n headersInstance.forEach((headerValue, headerName) => {\n if (headerValue) {\n request.headers.set(headerName, headerValue)\n }\n })\n return request\n },\n }\n sdkHooks.registerBeforeRequestHook(defaultHeaderHook)\n }\n\n if (hooks?.beforeCreateRequest) {\n hooks.beforeCreateRequest.forEach(hook => {\n sdkHooks.registerBeforeCreateRequestHook(hook)\n })\n }\n\n if (hooks?.beforeRequest) {\n hooks.beforeRequest.forEach(hook => {\n sdkHooks.registerBeforeRequestHook(hook)\n })\n }\n\n if (hooks?.afterSuccess) {\n hooks.afterSuccess.forEach(hook => {\n sdkHooks.registerAfterSuccessHook(hook)\n })\n }\n\n if (hooks?.afterError) {\n hooks.afterError.forEach(hook => {\n sdkHooks.registerAfterErrorHook(hook)\n })\n }\n\n if (!client._options.hooks) {\n client._options.hooks = sdkHooks\n }\n\n return client\n }, [url, headers, hooks])\n\n const queryClient = useMemo(() => {\n return queryClientFromProps ?? createSdkQueryClient()\n }, [queryClientFromProps])\n\n return (\n <QueryClientProvider client={queryClient}>\n <GustoEmbeddedProvider client={gustoClient}>{children}</GustoEmbeddedProvider>\n </QueryClientProvider>\n )\n}\n"],"names":["ApiProvider","url","headers","hooks","children","queryClientFromProps","gustoClient","useMemo","client","GustoEmbeddedCore","sdkHooks","NativeSDKHooks","apiVersionHook","defaultHeaderHook","context","request","headerValue","headerName","hook","queryClient","createSdkQueryClient","jsx","QueryClientProvider","GustoEmbeddedProvider"],"mappings":";;;;;;;;AA6CO,SAASA,EAAY;AAAA,EAC1B,KAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAaC;AACf,GAAqB;AACnB,QAAMC,IAAcC,EAAQ,MAAM;AAChC,UAAMC,IAAS,IAAIC,EAAkB;AAAA,MACnC,WAAWR;AAAA,IAAA,CACZ,GAEKS,IAAWF,EAAO,SAAS,SAAS,IAAIG,EAAA;AAI9C,QAFAD,EAAS,0BAA0BE,CAAc,GAE7CV,GAAS;AACX,YAAMW,IAAuC;AAAA,QAC3C,eAAe,CAACC,GAASC,OACC,IAAI,QAAQb,CAAO,EAC3B,QAAQ,CAACc,GAAaC,MAAe;AACnD,UAAID,KACFD,EAAQ,QAAQ,IAAIE,GAAYD,CAAW;AAAA,QAE/C,CAAC,GACMD;AAAA,MACT;AAEF,MAAAL,EAAS,0BAA0BG,CAAiB;AAAA,IACtD;AAEA,WAAIV,GAAO,uBACTA,EAAM,oBAAoB,QAAQ,CAAAe,MAAQ;AACxC,MAAAR,EAAS,gCAAgCQ,CAAI;AAAA,IAC/C,CAAC,GAGCf,GAAO,iBACTA,EAAM,cAAc,QAAQ,CAAAe,MAAQ;AAClC,MAAAR,EAAS,0BAA0BQ,CAAI;AAAA,IACzC,CAAC,GAGCf,GAAO,gBACTA,EAAM,aAAa,QAAQ,CAAAe,MAAQ;AACjC,MAAAR,EAAS,yBAAyBQ,CAAI;AAAA,IACxC,CAAC,GAGCf,GAAO,cACTA,EAAM,WAAW,QAAQ,CAAAe,MAAQ;AAC/B,MAAAR,EAAS,uBAAuBQ,CAAI;AAAA,IACtC,CAAC,GAGEV,EAAO,SAAS,UACnBA,EAAO,SAAS,QAAQE,IAGnBF;AAAA,EACT,GAAG,CAACP,GAAKC,GAASC,CAAK,CAAC,GAElBgB,IAAcZ,EAAQ,MACnBF,KAAwBe,EAAA,GAC9B,CAACf,CAAoB,CAAC;AAEzB,SACE,gBAAAgB,EAACC,KAAoB,QAAQH,GAC3B,4BAACI,GAAA,EAAsB,QAAQjB,GAAc,UAAAF,EAAA,CAAS,EAAA,CACxD;AAEJ;"}
1
+ {"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import { QueryClientProvider, type QueryClient } from '@tanstack/react-query'\nimport { GustoEmbeddedProvider } from '@gusto/embedded-api/react-query/_context'\nimport { GustoEmbeddedCore } from '@gusto/embedded-api/core'\nimport { SDKHooks as NativeSDKHooks } from '@gusto/embedded-api/hooks/hooks'\nimport { useMemo } from 'react'\nimport { apiVersionHook } from './apiVersionHook'\nimport { createSdkQueryClient } from './createSdkQueryClient'\nimport type { SDKHooks, BeforeRequestHook } from '@/types/hooks'\n\n/**\n * Props for {@link ApiProvider}.\n *\n * @internal\n */\nexport interface ApiProviderProps {\n /** Base URL the SDK uses for all `@gusto/embedded-api-v-2026-06-15` requests. */\n url: string\n /** Default headers applied to every SDK request, in addition to the `X-Gusto-API-Version` header set automatically. */\n headers?: HeadersInit\n /** Lifecycle hooks for intercepting and modifying SDK requests and responses. */\n hooks?: SDKHooks\n /** Subtree that renders inside the API + React Query providers. */\n children: React.ReactNode\n /** Optional React Query client. When omitted, a client is created with the SDK's defaults (auto-invalidation on mutation success). */\n queryClient?: QueryClient\n}\n\n/**\n * Wires the `@gusto/embedded-api-v-2026-06-15` client and a React Query client into the React tree.\n *\n * @remarks\n * Registers the SDK's `X-Gusto-API-Version` header on every request, applies any default `headers`,\n * and registers user-supplied lifecycle hooks (`beforeCreateRequest`, `beforeRequest`, `afterSuccess`,\n * `afterError`). When no `queryClient` is supplied, one is created with the SDK's defaults so\n * successful mutations under the `['@gusto/embedded-api-v-2026-06-15']` key invalidate every SDK\n * query automatically. Partners who supply their own `QueryClient` are responsible for matching that\n * contract.\n *\n * Typically wrapped by {@link GustoProvider}; use directly only when composing the provider stack\n * manually.\n *\n * @param props - See {@link ApiProviderProps}.\n * @returns A React subtree wrapped in `QueryClientProvider` and the embedded API context.\n * @internal\n */\nexport function ApiProvider({\n url,\n headers,\n hooks,\n children,\n queryClient: queryClientFromProps,\n}: ApiProviderProps) {\n const gustoClient = useMemo(() => {\n const client = new GustoEmbeddedCore({\n serverURL: url,\n })\n\n const sdkHooks = client._options.hooks || new NativeSDKHooks()\n\n sdkHooks.registerBeforeRequestHook(apiVersionHook)\n\n if (headers) {\n const defaultHeaderHook: BeforeRequestHook = {\n beforeRequest: (context, request) => {\n const headersInstance = new Headers(headers)\n headersInstance.forEach((headerValue, headerName) => {\n if (headerValue) {\n request.headers.set(headerName, headerValue)\n }\n })\n return request\n },\n }\n sdkHooks.registerBeforeRequestHook(defaultHeaderHook)\n }\n\n if (hooks?.beforeCreateRequest) {\n hooks.beforeCreateRequest.forEach(hook => {\n sdkHooks.registerBeforeCreateRequestHook(hook)\n })\n }\n\n if (hooks?.beforeRequest) {\n hooks.beforeRequest.forEach(hook => {\n sdkHooks.registerBeforeRequestHook(hook)\n })\n }\n\n if (hooks?.afterSuccess) {\n hooks.afterSuccess.forEach(hook => {\n sdkHooks.registerAfterSuccessHook(hook)\n })\n }\n\n if (hooks?.afterError) {\n hooks.afterError.forEach(hook => {\n sdkHooks.registerAfterErrorHook(hook)\n })\n }\n\n if (!client._options.hooks) {\n client._options.hooks = sdkHooks\n }\n\n return client\n }, [url, headers, hooks])\n\n const queryClient = useMemo(() => {\n return queryClientFromProps ?? createSdkQueryClient()\n }, [queryClientFromProps])\n\n return (\n <QueryClientProvider client={queryClient}>\n <GustoEmbeddedProvider client={gustoClient}>{children}</GustoEmbeddedProvider>\n </QueryClientProvider>\n )\n}\n"],"names":["ApiProvider","url","headers","hooks","children","queryClientFromProps","gustoClient","useMemo","client","GustoEmbeddedCore","sdkHooks","NativeSDKHooks","apiVersionHook","defaultHeaderHook","context","request","headerValue","headerName","hook","queryClient","createSdkQueryClient","jsx","QueryClientProvider","GustoEmbeddedProvider"],"mappings":";;;;;;;;AA6CO,SAASA,EAAY;AAAA,EAC1B,KAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAaC;AACf,GAAqB;AACnB,QAAMC,IAAcC,EAAQ,MAAM;AAChC,UAAMC,IAAS,IAAIC,EAAkB;AAAA,MACnC,WAAWR;AAAA,IAAA,CACZ,GAEKS,IAAWF,EAAO,SAAS,SAAS,IAAIG,EAAA;AAI9C,QAFAD,EAAS,0BAA0BE,CAAc,GAE7CV,GAAS;AACX,YAAMW,IAAuC;AAAA,QAC3C,eAAe,CAACC,GAASC,OACC,IAAI,QAAQb,CAAO,EAC3B,QAAQ,CAACc,GAAaC,MAAe;AACnD,UAAID,KACFD,EAAQ,QAAQ,IAAIE,GAAYD,CAAW;AAAA,QAE/C,CAAC,GACMD;AAAA,MACT;AAEF,MAAAL,EAAS,0BAA0BG,CAAiB;AAAA,IACtD;AAEA,WAAIV,GAAO,uBACTA,EAAM,oBAAoB,QAAQ,CAAAe,MAAQ;AACxC,MAAAR,EAAS,gCAAgCQ,CAAI;AAAA,IAC/C,CAAC,GAGCf,GAAO,iBACTA,EAAM,cAAc,QAAQ,CAAAe,MAAQ;AAClC,MAAAR,EAAS,0BAA0BQ,CAAI;AAAA,IACzC,CAAC,GAGCf,GAAO,gBACTA,EAAM,aAAa,QAAQ,CAAAe,MAAQ;AACjC,MAAAR,EAAS,yBAAyBQ,CAAI;AAAA,IACxC,CAAC,GAGCf,GAAO,cACTA,EAAM,WAAW,QAAQ,CAAAe,MAAQ;AAC/B,MAAAR,EAAS,uBAAuBQ,CAAI;AAAA,IACtC,CAAC,GAGEV,EAAO,SAAS,UACnBA,EAAO,SAAS,QAAQE,IAGnBF;AAAA,EACT,GAAG,CAACP,GAAKC,GAASC,CAAK,CAAC,GAElBgB,IAAcZ,EAAQ,MACnBF,KAAwBe,EAAA,GAC9B,CAACf,CAAoB,CAAC;AAEzB,SACE,gBAAAgB,EAACC,KAAoB,QAAQH,GAC3B,4BAACI,GAAA,EAAsB,QAAQjB,GAAc,UAAAF,EAAA,CAAS,EAAA,CACxD;AAEJ;"}
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * @internal
11
11
  */
12
- export declare const API_VERSION = "2026-02-01";
12
+ export declare const API_VERSION = "2026-06-15";
13
13
  /**
14
14
  * TanStack Query namespace the embedded-api client prefixes onto every generated
15
15
  * query and mutation key (segment 1 of every key it emits).
@@ -20,4 +20,4 @@ export declare const API_VERSION = "2026-02-01";
20
20
  *
21
21
  * @internal
22
22
  */
23
- export declare const API_QUERY_NAMESPACE: "@gusto/embedded-api-v-2026-02-01";
23
+ export declare const API_QUERY_NAMESPACE: "@gusto/embedded-api-v-2026-06-15";
@@ -1,4 +1,4 @@
1
- const e = "2026-02-01", o = `@gusto/embedded-api-v-${e}`;
1
+ const e = "2026-06-15", o = `@gusto/embedded-api-v-${e}`;
2
2
  export {
3
3
  o as API_QUERY_NAMESPACE,
4
4
  e as API_VERSION
@@ -1 +1 @@
1
- {"version":3,"file":"apiVersion.js","sources":["../../../src/contexts/ApiProvider/apiVersion.ts"],"sourcesContent":["/**\n * Single source of truth for the pinned Gusto Embedded API version.\n *\n * @remarks\n * Bumping the API version is a two-line change: update {@link API_VERSION} here and\n * repoint the `@gusto/embedded-api` alias target in `package.json`. Everything else —\n * the `X-Gusto-API-Version` request header and every hand-written TanStack Query key —\n * derives from this constant, so no per-file edits are required.\n *\n * @internal\n */\nexport const API_VERSION = '2026-02-01'\n\n/**\n * TanStack Query namespace the embedded-api client prefixes onto every generated\n * query and mutation key (segment 1 of every key it emits).\n *\n * @remarks\n * Must equal the resolved package name so hand-written keys used for targeted\n * invalidation match the library-generated ones. Derived from {@link API_VERSION}.\n *\n * @internal\n */\nexport const API_QUERY_NAMESPACE = `@gusto/embedded-api-v-${API_VERSION}` as const\n"],"names":["API_VERSION","API_QUERY_NAMESPACE"],"mappings":"AAWO,MAAMA,IAAc,cAYdC,IAAsB,yBAAyBD,CAAW;"}
1
+ {"version":3,"file":"apiVersion.js","sources":["../../../src/contexts/ApiProvider/apiVersion.ts"],"sourcesContent":["/**\n * Single source of truth for the pinned Gusto Embedded API version.\n *\n * @remarks\n * Bumping the API version is a two-line change: update {@link API_VERSION} here and\n * repoint the `@gusto/embedded-api` alias target in `package.json`. Everything else —\n * the `X-Gusto-API-Version` request header and every hand-written TanStack Query key —\n * derives from this constant, so no per-file edits are required.\n *\n * @internal\n */\nexport const API_VERSION = '2026-06-15'\n\n/**\n * TanStack Query namespace the embedded-api client prefixes onto every generated\n * query and mutation key (segment 1 of every key it emits).\n *\n * @remarks\n * Must equal the resolved package name so hand-written keys used for targeted\n * invalidation match the library-generated ones. Derived from {@link API_VERSION}.\n *\n * @internal\n */\nexport const API_QUERY_NAMESPACE = `@gusto/embedded-api-v-${API_VERSION}` as const\n"],"names":["API_VERSION","API_QUERY_NAMESPACE"],"mappings":"AAWO,MAAMA,IAAc,cAYdC,IAAsB,yBAAyBD,CAAW;"}
@@ -8,43 +8,47 @@ import { MultiSelectComboBox as a } from "../../../components/Common/UI/MultiSel
8
8
  import { Checkbox as f } from "../../../components/Common/UI/Checkbox/Checkbox.js";
9
9
  import { DatePicker as n } from "../../../components/Common/UI/DatePicker/DatePicker.js";
10
10
  import { DateRangePicker as d } from "../../../components/Common/UI/DateRangePicker/DateRangePicker.js";
11
- import { Radio as u } from "../../../components/Common/UI/Radio/Radio.js";
12
- import { RadioGroup as c } from "../../../components/Common/UI/RadioGroup/RadioGroup.js";
13
- import { Select as x } from "../../../components/Common/UI/Select/Select.js";
14
- import { Switch as B } from "../../../components/Common/UI/Switch/Switch.js";
11
+ import { Radio as x } from "../../../components/Common/UI/Radio/Radio.js";
12
+ import { RadioGroup as B } from "../../../components/Common/UI/RadioGroup/RadioGroup.js";
13
+ import { Select as u } from "../../../components/Common/UI/Select/Select.js";
14
+ import { Switch as c } from "../../../components/Common/UI/Switch/Switch.js";
15
15
  import { Button as l } from "../../../components/Common/UI/Button/Button.js";
16
16
  import { ButtonIcon as s } from "../../../components/Common/UI/Button/ButtonIcon.js";
17
17
  import { Alert as b } from "../../../components/Common/UI/Alert/Alert.js";
18
18
  import { Card as C } from "../../../components/Common/UI/Card/Card.js";
19
19
  import { Box as g } from "../../../components/Common/UI/Box/Box.js";
20
20
  import { BoxHeader as k } from "../../../components/Common/UI/BoxHeader/BoxHeader.js";
21
- import { Badge as L } from "../../../components/Common/UI/Badge/Badge.js";
22
- import { Banner as T } from "../../../components/Common/UI/Banner/Banner.js";
23
- import { Link as D } from "../../../components/Common/UI/Link/Link.js";
24
- import { Menu as I } from "../../../components/Common/UI/Menu/Menu.js";
25
- import { Table as P } from "../../../components/Common/UI/Table/Table.js";
26
- import { OrderedList as S } from "../../../components/Common/UI/List/OrderedList.js";
27
- import { UnorderedList as h } from "../../../components/Common/UI/List/UnorderedList.js";
21
+ import { FormBox as L } from "../../../components/Common/UI/FormBox/FormBox.js";
22
+ import { FormBoxHeader as T } from "../../../components/Common/UI/FormBoxHeader/FormBoxHeader.js";
23
+ import { Badge as D } from "../../../components/Common/UI/Badge/Badge.js";
24
+ import { Banner as I } from "../../../components/Common/UI/Banner/Banner.js";
25
+ import { Link as P } from "../../../components/Common/UI/Link/Link.js";
26
+ import { Menu as S } from "../../../components/Common/UI/Menu/Menu.js";
27
+ import { Table as h } from "../../../components/Common/UI/Table/Table.js";
28
+ import { OrderedList as F } from "../../../components/Common/UI/List/OrderedList.js";
29
+ import { UnorderedList as H } from "../../../components/Common/UI/List/UnorderedList.js";
28
30
  import { Heading as M } from "../../../components/Common/UI/Heading/Heading.js";
29
31
  import { Text as R } from "../../../components/Common/UI/Text/Text.js";
30
32
  import { CalendarPreview as w } from "../../../components/Common/UI/CalendarPreview/CalendarPreview.js";
31
33
  import { ProgressBar as A } from "../../../components/Common/UI/ProgressBar/ProgressBar.js";
32
34
  import { Breadcrumbs as G } from "../../../components/Common/UI/Breadcrumbs/Breadcrumbs.js";
33
- import { Tabs as H } from "../../../components/Common/UI/Tabs/Tabs.js";
34
- import { Dialog as v } from "../../../components/Common/UI/Dialog/Dialog.js";
35
- import { Modal as F } from "../../../components/Common/UI/Modal/Modal.js";
36
- import { LoadingSpinner as N } from "../../../components/Common/UI/LoadingSpinner/LoadingSpinner.js";
37
- import { DescriptionList as O } from "../../../components/Common/UI/DescriptionList/DescriptionList.js";
38
- import { FileInput as U } from "../../../components/Common/UI/FileInput/FileInput.js";
39
- const Io = {
35
+ import { Tabs as v } from "../../../components/Common/UI/Tabs/Tabs.js";
36
+ import { Dialog as N } from "../../../components/Common/UI/Dialog/Dialog.js";
37
+ import { Modal as O } from "../../../components/Common/UI/Modal/Modal.js";
38
+ import { LoadingSpinner as U } from "../../../components/Common/UI/LoadingSpinner/LoadingSpinner.js";
39
+ import { DescriptionList as j } from "../../../components/Common/UI/DescriptionList/DescriptionList.js";
40
+ import { FileInput as q } from "../../../components/Common/UI/FileInput/FileInput.js";
41
+ const Fo = {
40
42
  Alert: (o) => /* @__PURE__ */ r(b, { ...o }),
41
- Badge: (o) => /* @__PURE__ */ r(L, { ...o }),
42
- Banner: (o) => /* @__PURE__ */ r(T, { ...o }),
43
+ Badge: (o) => /* @__PURE__ */ r(D, { ...o }),
44
+ Banner: (o) => /* @__PURE__ */ r(I, { ...o }),
43
45
  Button: (o) => /* @__PURE__ */ r(l, { ...o }),
44
46
  ButtonIcon: (o) => /* @__PURE__ */ r(s, { ...o }),
45
47
  Card: (o) => /* @__PURE__ */ r(C, { ...o }),
46
48
  Box: (o) => /* @__PURE__ */ r(g, { ...o }),
47
49
  BoxHeader: (o) => /* @__PURE__ */ r(k, { ...o }),
50
+ FormBox: (o) => /* @__PURE__ */ r(L, { ...o }),
51
+ FormBoxHeader: (o) => /* @__PURE__ */ r(T, { ...o }),
48
52
  TextInput: (o) => /* @__PURE__ */ r(m, { ...o }),
49
53
  TextArea: (o) => /* @__PURE__ */ r(t, { ...o }),
50
54
  Checkbox: (o) => /* @__PURE__ */ r(f, { ...o }),
@@ -53,29 +57,29 @@ const Io = {
53
57
  MultiSelectComboBox: (o) => /* @__PURE__ */ r(a, { ...o }),
54
58
  DatePicker: (o) => /* @__PURE__ */ r(n, { ...o }),
55
59
  DateRangePicker: (o) => /* @__PURE__ */ r(d, { ...o }),
56
- OrderedList: (o) => /* @__PURE__ */ r(S, { ...o }),
57
- UnorderedList: (o) => /* @__PURE__ */ r(h, { ...o }),
60
+ OrderedList: (o) => /* @__PURE__ */ r(F, { ...o }),
61
+ UnorderedList: (o) => /* @__PURE__ */ r(H, { ...o }),
58
62
  NumberInput: (o) => /* @__PURE__ */ r(e, { ...o }),
59
- Radio: (o) => /* @__PURE__ */ r(u, { ...o }),
60
- RadioGroup: (o) => /* @__PURE__ */ r(c, { ...o }),
61
- Select: (o) => /* @__PURE__ */ r(x, { ...o }),
62
- Switch: (o) => /* @__PURE__ */ r(B, { ...o }),
63
- Link: (o) => /* @__PURE__ */ r(D, { ...o }),
64
- Menu: (o) => /* @__PURE__ */ r(I, { ...o }),
65
- Table: (o) => /* @__PURE__ */ r(P, { ...o }),
63
+ Radio: (o) => /* @__PURE__ */ r(x, { ...o }),
64
+ RadioGroup: (o) => /* @__PURE__ */ r(B, { ...o }),
65
+ Select: (o) => /* @__PURE__ */ r(u, { ...o }),
66
+ Switch: (o) => /* @__PURE__ */ r(c, { ...o }),
67
+ Link: (o) => /* @__PURE__ */ r(P, { ...o }),
68
+ Menu: (o) => /* @__PURE__ */ r(S, { ...o }),
69
+ Table: (o) => /* @__PURE__ */ r(h, { ...o }),
66
70
  Heading: (o) => /* @__PURE__ */ r(M, { ...o }),
67
71
  Text: (o) => /* @__PURE__ */ r(R, { ...o }),
68
72
  CalendarPreview: (o) => /* @__PURE__ */ r(w, { ...o }),
69
73
  ProgressBar: (o) => /* @__PURE__ */ r(A, { ...o }),
70
74
  Breadcrumbs: (o) => /* @__PURE__ */ r(G, { ...o }),
71
- Tabs: (o) => /* @__PURE__ */ r(H, { ...o }),
72
- Dialog: (o) => /* @__PURE__ */ r(v, { ...o }),
73
- Modal: (o) => /* @__PURE__ */ r(F, { ...o }),
74
- LoadingSpinner: (o) => /* @__PURE__ */ r(N, { ...o }),
75
- DescriptionList: (o) => /* @__PURE__ */ r(O, { ...o }),
76
- FileInput: (o) => /* @__PURE__ */ r(U, { ...o })
75
+ Tabs: (o) => /* @__PURE__ */ r(v, { ...o }),
76
+ Dialog: (o) => /* @__PURE__ */ r(N, { ...o }),
77
+ Modal: (o) => /* @__PURE__ */ r(O, { ...o }),
78
+ LoadingSpinner: (o) => /* @__PURE__ */ r(U, { ...o }),
79
+ DescriptionList: (o) => /* @__PURE__ */ r(j, { ...o }),
80
+ FileInput: (o) => /* @__PURE__ */ r(q, { ...o })
77
81
  };
78
82
  export {
79
- Io as defaultComponents
83
+ Fo as defaultComponents
80
84
  };
81
85
  //# sourceMappingURL=defaultComponentAdapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { TextAreaProps } from '@/components/Common/UI/TextArea/TextAreaTypes'\nimport { TextArea } from '@/components/Common/UI/TextArea'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { MultiSelectComboBoxProps } from '@/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes'\nimport { MultiSelectComboBox } from '@/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { DateRangePickerProps } from '@/components/Common/UI/DateRangePicker/DateRangePickerTypes'\nimport { DateRangePicker } from '@/components/Common/UI/DateRangePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport type { BoxProps } from '@/components/Common/UI/Box/BoxTypes'\nimport { Box } from '@/components/Common/UI/Box/Box'\nimport type { BoxHeaderProps } from '@/components/Common/UI/BoxHeader/BoxHeaderTypes'\nimport { BoxHeader } from '@/components/Common/UI/BoxHeader'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { Banner } from '@/components/Common/UI/Banner/Banner'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\nimport type { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs'\nimport { Breadcrumbs } from '@/components/Common/UI/Breadcrumbs'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport { Tabs } from '@/components/Common/UI/Tabs'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { Dialog } from '@/components/Common/UI/Dialog'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport { Modal } from '@/components/Common/UI/Modal'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinner } from '@/components/Common/UI/LoadingSpinner'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { DescriptionList } from '@/components/Common/UI/DescriptionList'\nimport type { FileInputProps } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport { FileInput } from '@/components/Common/UI/FileInput'\n\n/** @internal */\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Banner: (props: BannerProps) => <Banner {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n Box: (props: BoxProps) => <Box {...props} />,\n BoxHeader: (props: BoxHeaderProps) => <BoxHeader {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n TextArea: (props: TextAreaProps) => <TextArea {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n MultiSelectComboBox: (props: MultiSelectComboBoxProps) => <MultiSelectComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n DateRangePicker: (props: DateRangePickerProps) => <DateRangePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n Breadcrumbs: (props: BreadcrumbsProps) => <Breadcrumbs {...props} />,\n Tabs: (props: TabsProps) => <Tabs {...props} />,\n Dialog: (props: DialogProps) => <Dialog {...props} />,\n Modal: (props: ModalProps) => <Modal {...props} />,\n LoadingSpinner: (props: LoadingSpinnerProps) => <LoadingSpinner {...props} />,\n DescriptionList: (props: DescriptionListProps) => <DescriptionList {...props} />,\n FileInput: (props: FileInputProps) => <FileInput {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Banner","Button","ButtonIcon","Card","Box","BoxHeader","TextInput","TextArea","Checkbox","CheckboxGroup","ComboBox","MultiSelectComboBox","DatePicker","DateRangePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar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AAA,EAAM,GAAGjC,GAAO;AAAA,EAC7C,QAAQ,CAACA,MAAuB,gBAAAC,EAACiC,GAAA,EAAQ,GAAGlC,GAAO;AAAA,EACnD,OAAO,CAACA,MAAsB,gBAAAC,EAACkC,GAAA,EAAO,GAAGnC,GAAO;AAAA,EAChD,gBAAgB,CAACA,MAA+B,gBAAAC,EAACmC,GAAA,EAAgB,GAAGpC,GAAO;AAAA,EAC3E,iBAAiB,CAACA,MAAgC,gBAAAC,EAACoC,GAAA,EAAiB,GAAGrC,GAAO;AAAA,EAC9E,WAAW,CAACA,MAA0B,gBAAAC,EAACqC,GAAA,EAAW,GAAGtC,EAAA,CAAO;AAC9D;"}
1
+ {"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { TextAreaProps } from '@/components/Common/UI/TextArea/TextAreaTypes'\nimport { TextArea } from '@/components/Common/UI/TextArea'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { MultiSelectComboBoxProps } from '@/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes'\nimport { MultiSelectComboBox } from '@/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { DateRangePickerProps } from '@/components/Common/UI/DateRangePicker/DateRangePickerTypes'\nimport { DateRangePicker } from '@/components/Common/UI/DateRangePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport type { BoxProps } from '@/components/Common/UI/Box/BoxTypes'\nimport { Box } from '@/components/Common/UI/Box/Box'\nimport type { BoxHeaderProps } from '@/components/Common/UI/BoxHeader/BoxHeaderTypes'\nimport { BoxHeader } from '@/components/Common/UI/BoxHeader'\nimport type { FormBoxProps } from '@/components/Common/UI/FormBox/FormBoxTypes'\nimport { FormBox } from '@/components/Common/UI/FormBox/FormBox'\nimport type { FormBoxHeaderProps } from '@/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes'\nimport { FormBoxHeader } from '@/components/Common/UI/FormBoxHeader'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { Banner } from '@/components/Common/UI/Banner/Banner'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\nimport type { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs'\nimport { Breadcrumbs } from '@/components/Common/UI/Breadcrumbs'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport { Tabs } from '@/components/Common/UI/Tabs'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { Dialog } from '@/components/Common/UI/Dialog'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport { Modal } from '@/components/Common/UI/Modal'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinner } from '@/components/Common/UI/LoadingSpinner'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { DescriptionList } from '@/components/Common/UI/DescriptionList'\nimport type { FileInputProps } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport { FileInput } from '@/components/Common/UI/FileInput'\n\n/** @internal */\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Banner: (props: BannerProps) => <Banner {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n Box: (props: BoxProps) => <Box {...props} />,\n BoxHeader: (props: BoxHeaderProps) => <BoxHeader {...props} />,\n FormBox: (props: FormBoxProps) => <FormBox {...props} />,\n FormBoxHeader: (props: FormBoxHeaderProps) => <FormBoxHeader {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n TextArea: (props: TextAreaProps) => <TextArea {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n MultiSelectComboBox: (props: MultiSelectComboBoxProps) => <MultiSelectComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n DateRangePicker: (props: DateRangePickerProps) => <DateRangePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n Breadcrumbs: (props: BreadcrumbsProps) => <Breadcrumbs {...props} />,\n Tabs: (props: TabsProps) => <Tabs {...props} />,\n Dialog: (props: DialogProps) => <Dialog {...props} />,\n Modal: (props: ModalProps) => <Modal {...props} />,\n LoadingSpinner: (props: LoadingSpinnerProps) => <LoadingSpinner {...props} />,\n DescriptionList: (props: DescriptionListProps) => <DescriptionList {...props} />,\n FileInput: (props: FileInputProps) => <FileInput {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Banner","Button","ButtonIcon","Card","Box","BoxHeader","FormBox","FormBoxHeader","TextInput","TextArea","Checkbox","CheckboxGroup","ComboBox","MultiSelectComboBox","DatePicker","DateRangePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Breadcrumbs","Tabs","Dialog","Modal","LoadingSpinner","DescriptionList","FileInput"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFO,MAAMA,KAA2C;AAAA,EACtD,OAAO,CAACC,MAAsB,gBAAAC,EAACC,GAAA,EAAO,GAAGF,GAAO;AAAA,EAChD,OAAO,CAACA,MAAsB,gBAAAC,EAACE,GAAA,EAAO,GAAGH,GAAO;AAAA,EAChD,QAAQ,CAACA,MAAuB,gBAAAC,EAACG,GAAA,EAAQ,GAAGJ,GAAO;AAAA,EACnD,QAAQ,CAACA,MAAuB,gBAAAC,EAACI,GAAA,EAAQ,GAAGL,GAAO;AAAA,EACnD,YAAY,CAACA,MAA2B,gBAAAC,EAACK,GAAA,EAAY,GAAGN,GAAO;AAAA,EAC/D,MAAM,CAACA,MAAqB,gBAAAC,EAACM,GAAA,EAAM,GAAGP,GAAO;AAAA,EAC7C,KAAK,CAACA,MAAoB,gBAAAC,EAACO,GAAA,EAAK,GAAGR,GAAO;AAAA,E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ardProps } from '../../components/Common/UI/Card/CardTypes';
5
5
  export type { BoxProps } from '../../components/Common/UI/Box/BoxTypes';
6
6
  export type { BoxHeaderProps } from '../../components/Common/UI/BoxHeader/BoxHeaderTypes';
7
+ export type { FormBoxProps } from '../../components/Common/UI/FormBox/FormBoxTypes';
8
+ export type { FormBoxHeaderProps } from '../../components/Common/UI/FormBoxHeader/FormBoxHeaderTypes';
7
9
  export type { CheckboxProps } from '../../components/Common/UI/Checkbox/CheckboxTypes';
8
10
  export type { CheckboxGroupProps, CheckboxGroupOption, } from '../../components/Common/UI/CheckboxGroup/CheckboxGroupTypes';
9
11
  export type { ComboBoxProps, ComboBoxOption } from '../../components/Common/UI/ComboBox/ComboBoxTypes';
@@ -17,6 +17,7 @@ import { DialogProps } from '../../components/Common/UI/Dialog/DialogTypes';
17
17
  import { LoadingSpinnerProps } from '../../components/Common/UI/LoadingSpinner/LoadingSpinnerTypes';
18
18
  import { FileInputProps } from '../../components/Common/UI/FileInput/FileInputTypes';
19
19
  import { BoxHeaderProps } from '../../components/Common/UI/BoxHeader/BoxHeaderTypes';
20
+ import { FormBoxHeaderProps } from '../../components/Common/UI/FormBoxHeader/FormBoxHeaderTypes';
20
21
  import { DescriptionListProps } from '../../components/Common/UI/DescriptionList/DescriptionListTypes';
21
22
  /** @internal */
22
23
  export declare const componentCreators: {
@@ -92,6 +93,10 @@ export declare const componentCreators: {
92
93
  (props: BoxHeaderProps): import('react').ReactNode | Promise<import('react').ReactNode>;
93
94
  displayName: string;
94
95
  };
96
+ readonly FormBoxHeader: (customComponent: FunctionComponent<FormBoxHeaderProps>) => {
97
+ (props: FormBoxHeaderProps): import('react').ReactNode | Promise<import('react').ReactNode>;
98
+ displayName: string;
99
+ };
95
100
  readonly DescriptionList: (customComponent: FunctionComponent<DescriptionListProps>) => {
96
101
  (props: DescriptionListProps): import('react').ReactNode | Promise<import('react').ReactNode>;
97
102
  displayName: string;
@@ -13,16 +13,17 @@ import { SwitchDefaults as g } from "../../components/Common/UI/Switch/SwitchTyp
13
13
  import { TableDefaults as I } from "../../components/Common/UI/Table/TableTypes.js";
14
14
  import { TextDefaults as T } from "../../components/Common/UI/Text/TextTypes.js";
15
15
  import { TextInputDefaults as k } from "../../components/Common/UI/TextInput/TextInputTypes.js";
16
- import { DialogDefaults as G } from "../../components/Common/UI/Dialog/DialogTypes.js";
17
- import { LoadingSpinnerDefaults as L } from "../../components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js";
18
- import { FileInputDefaults as R } from "../../components/Common/UI/FileInput/FileInputTypes.js";
19
- import { BoxHeaderDefaults as S } from "../../components/Common/UI/BoxHeader/BoxHeaderTypes.js";
20
- import { DescriptionListDefaults as w } from "../../components/Common/UI/DescriptionList/DescriptionListTypes.js";
21
- function o(i, t) {
16
+ import { DialogDefaults as F } from "../../components/Common/UI/Dialog/DialogTypes.js";
17
+ import { LoadingSpinnerDefaults as G } from "../../components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js";
18
+ import { FileInputDefaults as H } from "../../components/Common/UI/FileInput/FileInputTypes.js";
19
+ import { BoxHeaderDefaults as L } from "../../components/Common/UI/BoxHeader/BoxHeaderTypes.js";
20
+ import { FormBoxHeaderDefaults as R } from "../../components/Common/UI/FormBoxHeader/FormBoxHeaderTypes.js";
21
+ import { DescriptionListDefaults as S } from "../../components/Common/UI/DescriptionList/DescriptionListTypes.js";
22
+ function o(a, t) {
22
23
  return (e) => {
23
24
  const r = (n) => {
24
- const a = f(n, i);
25
- return e(a);
25
+ const i = f(n, a);
26
+ return e(i);
26
27
  };
27
28
  return r.displayName = `withAutoDefault(${t})`, r;
28
29
  };
@@ -42,21 +43,22 @@ const p = {
42
43
  Table: o(I, "Table"),
43
44
  Text: o(T, "Text"),
44
45
  TextInput: o(k, "TextInput"),
45
- Dialog: o(G, "Dialog"),
46
+ Dialog: o(F, "Dialog"),
46
47
  LoadingSpinner: o(
47
- L,
48
+ G,
48
49
  "LoadingSpinner"
49
50
  ),
50
- FileInput: o(R, "FileInput"),
51
- BoxHeader: o(S, "BoxHeader"),
51
+ FileInput: o(H, "FileInput"),
52
+ BoxHeader: o(L, "BoxHeader"),
53
+ FormBoxHeader: o(R, "FormBoxHeader"),
52
54
  DescriptionList: o(
53
- w,
55
+ S,
54
56
  "DescriptionList"
55
57
  )
56
58
  };
57
- function X(i = {}) {
59
+ function Z(a = {}) {
58
60
  const t = { ...u };
59
- for (const [e, r] of Object.entries(i)) {
61
+ for (const [e, r] of Object.entries(a)) {
60
62
  const n = e;
61
63
  if (e in p) {
62
64
  const m = p[e];
@@ -68,6 +70,6 @@ function X(i = {}) {
68
70
  }
69
71
  export {
70
72
  p as componentCreators,
71
- X as createComponents
73
+ Z as createComponents
72
74
  };
73
75
  //# sourceMappingURL=createComponentsWithDefaults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createComponentsWithDefaults.js","sources":["../../../src/contexts/ComponentAdapter/createComponentsWithDefaults.ts"],"sourcesContent":["import type { FunctionComponent } from 'react'\nimport type { ComponentsContextType } from './useComponentContext'\nimport { defaultComponents } from './adapters/defaultComponentAdapter'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n// Import prop types and their defaults\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { AlertDefaults } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { BadgeDefaults } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport { BannerDefaults } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { ButtonDefaults, ButtonIconDefaults } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { CheckboxDefaults } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroupDefaults } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { MenuDefaults } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { RadioDefaults } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroupDefaults } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { SwitchDefaults } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport { TableDefaults } from '@/components/Common/UI/Table/TableTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { TextDefaults } from '@/components/Common/UI/Text/TextTypes'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInputDefaults } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { DialogDefaults } from '@/components/Common/UI/Dialog/DialogTypes'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinnerDefaults } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport type { FileInputProps } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport { FileInputDefaults } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport type { BoxHeaderProps } from '@/components/Common/UI/BoxHeader/BoxHeaderTypes'\nimport { BoxHeaderDefaults } from '@/components/Common/UI/BoxHeader/BoxHeaderTypes'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { DescriptionListDefaults } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\n\n/** @internal */\nfunction composeWithDefaults<TProps>(defaults: Partial<TProps>, componentName: string) {\n return (customComponent: FunctionComponent<TProps>) => {\n const wrappedComponent = (props: TProps) => {\n const propsWithDefaults = applyMissingDefaults(props, defaults)\n return customComponent(propsWithDefaults)\n }\n wrappedComponent.displayName = `withAutoDefault(${componentName})`\n return wrappedComponent\n }\n}\n\n/** @internal */\nexport const componentCreators = {\n Alert: composeWithDefaults<AlertProps>(AlertDefaults, 'Alert'),\n Badge: composeWithDefaults<BadgeProps>(BadgeDefaults, 'Badge'),\n Banner: composeWithDefaults<BannerProps>(BannerDefaults, 'Banner'),\n Button: composeWithDefaults<ButtonProps>(ButtonDefaults, 'Button'),\n ButtonIcon: composeWithDefaults<ButtonIconProps>(ButtonIconDefaults, 'ButtonIcon'),\n Checkbox: composeWithDefaults<CheckboxProps>(CheckboxDefaults, 'Checkbox'),\n CheckboxGroup: composeWithDefaults<CheckboxGroupProps>(CheckboxGroupDefaults, 'CheckboxGroup'),\n Menu: composeWithDefaults<MenuProps>(MenuDefaults, 'Menu'),\n Radio: composeWithDefaults<RadioProps>(RadioDefaults, 'Radio'),\n RadioGroup: composeWithDefaults<RadioGroupProps>(RadioGroupDefaults, 'RadioGroup'),\n Switch: composeWithDefaults<SwitchProps>(SwitchDefaults, 'Switch'),\n Table: composeWithDefaults<TableProps>(TableDefaults, 'Table'),\n Text: composeWithDefaults<TextProps>(TextDefaults, 'Text'),\n TextInput: composeWithDefaults<TextInputProps>(TextInputDefaults, 'TextInput'),\n Dialog: composeWithDefaults<DialogProps>(DialogDefaults, 'Dialog'),\n LoadingSpinner: composeWithDefaults<LoadingSpinnerProps>(\n LoadingSpinnerDefaults,\n 'LoadingSpinner',\n ),\n FileInput: composeWithDefaults<FileInputProps>(FileInputDefaults, 'FileInput'),\n BoxHeader: composeWithDefaults<BoxHeaderProps>(BoxHeaderDefaults, 'BoxHeader'),\n DescriptionList: composeWithDefaults<DescriptionListProps>(\n DescriptionListDefaults,\n 'DescriptionList',\n ),\n} as const\n\n/**\n * Creates components with automatic default prop handling.\n * Supports both partial (GustoProvider) and full (GustoProviderCustomUIAdapter) component sets.\n *\n * @internal\n */\nexport function createComponents(\n providedComponents: Partial<ComponentsContextType> = {},\n): ComponentsContextType {\n const components = { ...defaultComponents }\n\n for (const [componentName, providedComponent] of Object.entries(providedComponents)) {\n const typedComponentName = componentName as keyof ComponentsContextType\n\n if (componentName in componentCreators) {\n const creatorKey = componentName as keyof typeof componentCreators\n const creator = componentCreators[creatorKey]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = creator(providedComponent as any) as any\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = providedComponent as any\n }\n }\n\n return components\n}\n"],"names":["composeWithDefaults","defaults","componentName","customComponent","wrappedComponent","props","propsWithDefaults","applyMissingDefaults","componentCreators","AlertDefaults","BadgeDefaults","BannerDefaults","ButtonDefaults","ButtonIconDefaults","CheckboxDefaults","CheckboxGroupDefaults","MenuDefaults","RadioDefaults","RadioGroupDefaults","SwitchDefaults","TableDefaults","TextDefaults","TextInputDefaults","DialogDefaults","LoadingSpinnerDefaults","FileInputDefaults","BoxHeaderDefaults","DescriptionListDefaults","createComponents","providedComponents","components","defaultComponents","providedComponent","typedComponentName","creator"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2CA,SAASA,EAA4BC,GAA2BC,GAAuB;AACrF,SAAO,CAACC,MAA+C;AACrD,UAAMC,IAAmB,CAACC,MAAkB;AAC1C,YAAMC,IAAoBC,EAAqBF,GAAOJ,CAAQ;AAC9D,aAAOE,EAAgBG,CAAiB;AAAA,IAC1C;AACA,WAAAF,EAAiB,cAAc,mBAAmBF,CAAa,KACxDE;AAAA,EACT;AACF;AAGO,MAAMI,IAAoB;AAAA,EAC/B,OAAOR,EAAgCS,GAAe,OAAO;AAAA,EAC7D,OAAOT,EAAgCU,GAAe,OAAO;AAAA,EAC7D,QAAQV,EAAiCW,GAAgB,QAAQ;AAAA,EACjE,QAAQX,EAAiCY,GAAgB,QAAQ;AAAA,EACjE,YAAYZ,EAAqCa,GAAoB,YAAY;AAAA,EACjF,UAAUb,EAAmCc,GAAkB,UAAU;AAAA,EACzE,eAAed,EAAwCe,GAAuB,eAAe;AAAA,EAC7F,MAAMf,EAA+BgB,GAAc,MAAM;AAAA,EACzD,OAAOhB,EAAgCiB,GAAe,OAAO;AAAA,EAC7D,YAAYjB,EAAqCkB,GAAoB,YAAY;AAAA,EACjF,QAAQlB,EAAiCmB,GAAgB,QAAQ;AAAA,EACjE,OAAOnB,EAAgCoB,GAAe,OAAO;AAAA,EAC7D,MAAMpB,EAA+BqB,GAAc,MAAM;AAAA,EACzD,WAAWrB,EAAoCsB,GAAmB,WAAW;AAAA,EAC7E,QAAQtB,EAAiCuB,GAAgB,QAAQ;AAAA,EACjE,gBAAgBvB;AAAA,IACdwB;AAAA,IACA;AAAA,EAAA;AAAA,EAEF,WAAWxB,EAAoCyB,GAAmB,WAAW;AAAA,EAC7E,WAAWzB,EAAoC0B,GAAmB,WAAW;AAAA,EAC7E,iBAAiB1B;AAAA,IACf2B;AAAA,IACA;AAAA,EAAA;AAEJ;AAQO,SAASC,EACdC,IAAqD,IAC9B;AACvB,QAAMC,IAAa,EAAE,GAAGC,EAAA;AAExB,aAAW,CAAC7B,GAAe8B,CAAiB,KAAK,OAAO,QAAQH,CAAkB,GAAG;AACnF,UAAMI,IAAqB/B;AAE3B,QAAIA,KAAiBM,GAAmB;AAEtC,YAAM0B,IAAU1B,EADGN,CACyB;AAE5C,MAAA4B,EAAWG,CAAkB,IAAIC,EAAQF,CAAwB;AAAA,IACnE;AAEE,MAAAF,EAAWG,CAAkB,IAAID;AAAA,EAErC;AAEA,SAAOF;AACT;"}
1
+ {"version":3,"file":"createComponentsWithDefaults.js","sources":["../../../src/contexts/ComponentAdapter/createComponentsWithDefaults.ts"],"sourcesContent":["import type { FunctionComponent } from 'react'\nimport type { ComponentsContextType } from './useComponentContext'\nimport { defaultComponents } from './adapters/defaultComponentAdapter'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n// Import prop types and their defaults\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { AlertDefaults } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { BadgeDefaults } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport { BannerDefaults } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { ButtonDefaults, ButtonIconDefaults } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { CheckboxDefaults } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroupDefaults } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { MenuDefaults } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { RadioDefaults } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroupDefaults } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { SwitchDefaults } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport { TableDefaults } from '@/components/Common/UI/Table/TableTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { TextDefaults } from '@/components/Common/UI/Text/TextTypes'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInputDefaults } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { DialogDefaults } from '@/components/Common/UI/Dialog/DialogTypes'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinnerDefaults } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport type { FileInputProps } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport { FileInputDefaults } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport type { BoxHeaderProps } from '@/components/Common/UI/BoxHeader/BoxHeaderTypes'\nimport { BoxHeaderDefaults } from '@/components/Common/UI/BoxHeader/BoxHeaderTypes'\nimport type { FormBoxHeaderProps } from '@/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes'\nimport { FormBoxHeaderDefaults } from '@/components/Common/UI/FormBoxHeader/FormBoxHeaderTypes'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { DescriptionListDefaults } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\n\n/** @internal */\nfunction composeWithDefaults<TProps>(defaults: Partial<TProps>, componentName: string) {\n return (customComponent: FunctionComponent<TProps>) => {\n const wrappedComponent = (props: TProps) => {\n const propsWithDefaults = applyMissingDefaults(props, defaults)\n return customComponent(propsWithDefaults)\n }\n wrappedComponent.displayName = `withAutoDefault(${componentName})`\n return wrappedComponent\n }\n}\n\n/** @internal */\nexport const componentCreators = {\n Alert: composeWithDefaults<AlertProps>(AlertDefaults, 'Alert'),\n Badge: composeWithDefaults<BadgeProps>(BadgeDefaults, 'Badge'),\n Banner: composeWithDefaults<BannerProps>(BannerDefaults, 'Banner'),\n Button: composeWithDefaults<ButtonProps>(ButtonDefaults, 'Button'),\n ButtonIcon: composeWithDefaults<ButtonIconProps>(ButtonIconDefaults, 'ButtonIcon'),\n Checkbox: composeWithDefaults<CheckboxProps>(CheckboxDefaults, 'Checkbox'),\n CheckboxGroup: composeWithDefaults<CheckboxGroupProps>(CheckboxGroupDefaults, 'CheckboxGroup'),\n Menu: composeWithDefaults<MenuProps>(MenuDefaults, 'Menu'),\n Radio: composeWithDefaults<RadioProps>(RadioDefaults, 'Radio'),\n RadioGroup: composeWithDefaults<RadioGroupProps>(RadioGroupDefaults, 'RadioGroup'),\n Switch: composeWithDefaults<SwitchProps>(SwitchDefaults, 'Switch'),\n Table: composeWithDefaults<TableProps>(TableDefaults, 'Table'),\n Text: composeWithDefaults<TextProps>(TextDefaults, 'Text'),\n TextInput: composeWithDefaults<TextInputProps>(TextInputDefaults, 'TextInput'),\n Dialog: composeWithDefaults<DialogProps>(DialogDefaults, 'Dialog'),\n LoadingSpinner: composeWithDefaults<LoadingSpinnerProps>(\n LoadingSpinnerDefaults,\n 'LoadingSpinner',\n ),\n FileInput: composeWithDefaults<FileInputProps>(FileInputDefaults, 'FileInput'),\n BoxHeader: composeWithDefaults<BoxHeaderProps>(BoxHeaderDefaults, 'BoxHeader'),\n FormBoxHeader: composeWithDefaults<FormBoxHeaderProps>(FormBoxHeaderDefaults, 'FormBoxHeader'),\n DescriptionList: composeWithDefaults<DescriptionListProps>(\n DescriptionListDefaults,\n 'DescriptionList',\n ),\n} as const\n\n/**\n * Creates components with automatic default prop handling.\n * Supports both partial (GustoProvider) and full (GustoProviderCustomUIAdapter) component sets.\n *\n * @internal\n */\nexport function createComponents(\n providedComponents: Partial<ComponentsContextType> = {},\n): ComponentsContextType {\n const components = { ...defaultComponents }\n\n for (const [componentName, providedComponent] of Object.entries(providedComponents)) {\n const typedComponentName = componentName as keyof ComponentsContextType\n\n if (componentName in componentCreators) {\n const creatorKey = componentName as keyof typeof componentCreators\n const creator = componentCreators[creatorKey]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = creator(providedComponent as any) as any\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = providedComponent as any\n }\n }\n\n return components\n}\n"],"names":["composeWithDefaults","defaults","componentName","customComponent","wrappedComponent","props","propsWithDefaults","applyMissingDefaults","componentCreators","AlertDefaults","BadgeDefaults","BannerDefaults","ButtonDefaults","ButtonIconDefaults","CheckboxDefaults","CheckboxGroupDefaults","MenuDefaults","RadioDefaults","RadioGroupDefaults","SwitchDefaults","TableDefaults","TextDefaults","TextInputDefaults","DialogDefaults","LoadingSpinnerDefaults","FileInputDefaults","BoxHeaderDefaults","FormBoxHeaderDefaults","DescriptionListDefaults","createComponents","providedComponents","components","defaultComponents","providedComponent","typedComponentName","creator"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6CA,SAASA,EAA4BC,GAA2BC,GAAuB;AACrF,SAAO,CAACC,MAA+C;AACrD,UAAMC,IAAmB,CAACC,MAAkB;AAC1C,YAAMC,IAAoBC,EAAqBF,GAAOJ,CAAQ;AAC9D,aAAOE,EAAgBG,CAAiB;AAAA,IAC1C;AACA,WAAAF,EAAiB,cAAc,mBAAmBF,CAAa,KACxDE;AAAA,EACT;AACF;AAGO,MAAMI,IAAoB;AAAA,EAC/B,OAAOR,EAAgCS,GAAe,OAAO;AAAA,EAC7D,OAAOT,EAAgCU,GAAe,OAAO;AAAA,EAC7D,QAAQV,EAAiCW,GAAgB,QAAQ;AAAA,EACjE,QAAQX,EAAiCY,GAAgB,QAAQ;AAAA,EACjE,YAAYZ,EAAqCa,GAAoB,YAAY;AAAA,EACjF,UAAUb,EAAmCc,GAAkB,UAAU;AAAA,EACzE,eAAed,EAAwCe,GAAuB,eAAe;AAAA,EAC7F,MAAMf,EAA+BgB,GAAc,MAAM;AAAA,EACzD,OAAOhB,EAAgCiB,GAAe,OAAO;AAAA,EAC7D,YAAYjB,EAAqCkB,GAAoB,YAAY;AAAA,EACjF,QAAQlB,EAAiCmB,GAAgB,QAAQ;AAAA,EACjE,OAAOnB,EAAgCoB,GAAe,OAAO;AAAA,EAC7D,MAAMpB,EAA+BqB,GAAc,MAA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