@gusto/embedded-react-sdk 0.14.1 → 0.15.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 (258) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/assets/icons/feature-icon-check.svg.js +10 -0
  3. package/dist/assets/icons/feature-icon-check.svg.js.map +1 -0
  4. package/dist/components/Base/Base.js +4 -4
  5. package/dist/components/Common/DataView/DataView.d.ts +2 -1
  6. package/dist/components/Common/DataView/DataView.js +19 -18
  7. package/dist/components/Common/DataView/DataView.js.map +1 -1
  8. package/dist/components/Common/PaginationControl/PaginationControl.js +36 -36
  9. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  10. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +3 -1
  11. package/dist/components/Common/SignatureForm/SignatureForm.js +14 -11
  12. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  13. package/dist/components/Common/SignatureForm/SignatureFormActions.js +9 -7
  14. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  15. package/dist/components/Common/SignatureForm/SignatureFormFields.js +15 -12
  16. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/AssignSignatory.js +8 -6
  18. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +5 -2
  20. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +4 -2
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +9 -7
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +16 -15
  26. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  27. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +5 -4
  28. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +4 -2
  30. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  31. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +12 -10
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  33. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -9
  34. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +5 -4
  36. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/TitleSelect.js +5 -3
  38. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +7 -6
  40. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +10 -9
  42. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  43. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -8
  44. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  45. package/dist/components/Company/BankAccount/BankAccountForm/context.js +5 -4
  46. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  47. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -8
  48. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  49. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +10 -8
  50. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +7 -4
  52. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  53. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +4 -2
  54. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  55. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -9
  56. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  57. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  58. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  59. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +10 -8
  60. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  61. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
  62. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  63. package/dist/components/Company/FederalTaxes/Actions.js +9 -7
  64. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  65. package/dist/components/Company/FederalTaxes/FederalTaxes.js +5 -3
  66. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  67. package/dist/components/Company/FederalTaxes/Form.js +7 -6
  68. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  69. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -9
  70. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  71. package/dist/components/Company/Industry/Actions.js +9 -7
  72. package/dist/components/Company/Industry/Actions.js.map +1 -1
  73. package/dist/components/Company/Industry/Context.js +8 -7
  74. package/dist/components/Company/Industry/Context.js.map +1 -1
  75. package/dist/components/Company/Industry/Edit.js +7 -4
  76. package/dist/components/Company/Industry/Edit.js.map +1 -1
  77. package/dist/components/Company/Locations/LocationForm/Actions.js +10 -8
  78. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  79. package/dist/components/Company/Locations/LocationForm/Form.js +7 -5
  80. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  81. package/dist/components/Company/Locations/LocationForm/LocationForm.js +12 -10
  82. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  83. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +5 -4
  84. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  85. package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
  86. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  87. package/dist/components/Company/Locations/LocationsList/List.js +25 -22
  88. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  89. package/dist/components/Company/Locations/LocationsList/LocationsList.js +11 -9
  90. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  91. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +3 -1
  92. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +5 -4
  93. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  94. package/dist/components/Company/OnboardingOverview/Completed.js +12 -10
  95. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  96. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +11 -9
  97. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  98. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +9 -7
  99. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  100. package/dist/components/Company/OnboardingOverview/context.js +5 -4
  101. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  102. package/dist/components/Company/PaySchedule/PaySchedule.js +5 -4
  103. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  104. package/dist/components/Company/PaySchedule/_parts/Actions.js +11 -9
  105. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  106. package/dist/components/Company/PaySchedule/_parts/Edit.js +14 -14
  107. package/dist/components/Company/PaySchedule/_parts/Head.js +11 -9
  108. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  109. package/dist/components/Company/PaySchedule/_parts/List.js +18 -17
  110. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  111. package/dist/components/Company/PaySchedule/usePaySchedule.js +7 -6
  112. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  113. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +4 -2
  114. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  115. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +5 -4
  116. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  117. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +4 -2
  118. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  119. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +4 -2
  120. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  121. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +5 -4
  122. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  123. package/dist/components/Contractor/Address/Address.js +7 -5
  124. package/dist/components/Contractor/Address/Address.js.map +1 -1
  125. package/dist/components/Contractor/Address/Form.js +9 -7
  126. package/dist/components/Contractor/Address/Form.js.map +1 -1
  127. package/dist/components/Contractor/Address/useAddress.js +7 -6
  128. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  129. package/dist/components/Contractor/ContractorList/index.js +59 -57
  130. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  131. package/dist/components/Contractor/ContractorList/useContractorList.d.ts +3 -1
  132. package/dist/components/Contractor/ContractorList/useContractorList.js +7 -6
  133. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
  134. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
  135. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  136. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +4 -2
  137. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  138. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  139. package/dist/components/Contractor/Profile/useContractorProfile.js +4 -3
  140. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  141. package/dist/components/Contractor/Submit/Submit.js +21 -20
  142. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  143. package/dist/components/Employee/Compensation/Actions.js +13 -12
  144. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  145. package/dist/components/Employee/Compensation/Edit.js +14 -14
  146. package/dist/components/Employee/Compensation/List.js +23 -22
  147. package/dist/components/Employee/Compensation/List.js.map +1 -1
  148. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +11 -10
  149. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  150. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +33 -32
  151. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  152. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
  153. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +11 -11
  154. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +23 -22
  155. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  156. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
  157. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  158. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +5 -3
  159. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  160. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +5 -2
  161. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  162. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +5 -4
  163. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  164. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +5 -3
  165. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  166. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +5 -4
  167. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  168. package/dist/components/Employee/EmployeeList/Actions.js +8 -6
  169. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  170. package/dist/components/Employee/EmployeeList/EmployeeList.js +17 -13
  171. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  172. package/dist/components/Employee/EmployeeList/Head.js +7 -5
  173. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  174. package/dist/components/Employee/EmployeeList/List.js +45 -43
  175. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  176. package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +3 -1
  177. package/dist/components/Employee/EmployeeList/useEmployeeList.js +5 -4
  178. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  179. package/dist/components/Employee/FederalTaxes/Actions.js +9 -7
  180. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  181. package/dist/components/Employee/FederalTaxes/FederalForm.js +13 -11
  182. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  183. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +5 -4
  184. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  185. package/dist/components/Employee/Landing/Landing.js +11 -10
  186. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  187. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  188. package/dist/components/Employee/PaymentMethod/Actions.js +8 -6
  189. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  190. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -3
  191. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  192. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +12 -11
  193. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  194. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +4 -2
  195. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  196. package/dist/components/Employee/PaymentMethod/Split.js +7 -7
  197. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +7 -6
  198. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  199. package/dist/components/Employee/Profile/Actions.js +9 -7
  200. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  201. package/dist/components/Employee/Profile/AdminPersonalDetails.js +7 -6
  202. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  203. package/dist/components/Employee/Profile/HomeAddress.js +6 -5
  204. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  205. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +25 -23
  206. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  207. package/dist/components/Employee/Profile/useProfile.js +5 -4
  208. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  209. package/dist/components/Employee/StateTaxes/Actions.js +10 -8
  210. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  211. package/dist/components/Employee/StateTaxes/useStateTaxes.js +5 -4
  212. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  213. package/dist/components/Employee/Taxes/Actions.js +10 -8
  214. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  215. package/dist/components/Employee/Taxes/FederalForm.js +14 -12
  216. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  217. package/dist/components/Employee/Taxes/useTaxes.js +5 -4
  218. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  219. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +15 -13
  220. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  221. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +15 -13
  222. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  223. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +118 -88
  224. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  225. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
  226. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +72 -76
  227. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  228. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +21 -20
  229. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  230. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +27 -27
  231. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
  232. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  233. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +21 -20
  234. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  235. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +23 -22
  236. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  237. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +84 -78
  238. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  239. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +75 -74
  240. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  241. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  242. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  243. package/dist/components/Payroll/helpers.d.ts +2 -0
  244. package/dist/components/Payroll/helpers.js +38 -37
  245. package/dist/components/Payroll/helpers.js.map +1 -1
  246. package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
  247. package/dist/components/Payroll/usePreparedPayrollData.js +26 -19
  248. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  249. package/dist/components/index.d.ts +1 -1
  250. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +4 -2
  251. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  252. package/dist/i18n/en/Payroll.PayrollHistory.json.js +9 -9
  253. package/dist/index.js +1 -1
  254. package/dist/style.css +1 -1
  255. package/dist/types/i18next.d.ts +1 -1
  256. package/package.json +7 -7
  257. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +0 -23
  258. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.15.0
4
+
5
+ ### Features & Enhancements
6
+
7
+ - Remove deprecated payroll flow and unstable prefix - Payroll components are now stable
8
+ - Implement pagination for payroll configuration
9
+ - Add logic to hide skip payroll functionality
10
+ - Add emptyState back to DataView component
11
+ - Sort payroll config by API instead of client for better performance
12
+
13
+ ### Fixes
14
+
15
+ - Update PayrollHistory to include correct amount
16
+ - Fix twoPercentShareholder form integration and error handling
17
+
18
+ ### Refactoring
19
+
20
+ - Refactor pagination control to uncontrolled component
21
+
22
+ ### Chores & Maintenance
23
+
24
+ - Upgrade embedded client to latest 0.8.1
25
+ - Bump dompurify from 3.2.7 to 3.3.0
26
+ - Bump react-hook-form from 7.64.0 to 7.65.0
27
+ - Bump vite from 6.3.6 to 6.4.0
28
+ - Bump typescript-eslint from 8.46.0 to 8.46.1
29
+ - Bump eslint-plugin-react-refresh from 0.4.23 to 0.4.24
30
+
3
31
  ## 0.14.1
4
32
 
5
33
  ### Fixes
@@ -0,0 +1,10 @@
1
+ import * as e from "react";
2
+ const l = ({
3
+ title: t,
4
+ titleId: r,
5
+ ...a
6
+ }) => /* @__PURE__ */ e.createElement("svg", { width: 52, height: 52, viewBox: "0 0 52 52", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": r, ...a }, t ? /* @__PURE__ */ e.createElement("title", { id: r }, t) : null, /* @__PURE__ */ e.createElement("g", { filter: "url(#filter0_dii_11785_12181)" }, /* @__PURE__ */ e.createElement("path", { d: "M2 11C2 5.47715 6.47715 1 12 1H40C45.5229 1 50 5.47715 50 11V39C50 44.5229 45.5228 49 40 49H12C6.47715 49 2 44.5228 2 39V11Z", fill: "white" }), /* @__PURE__ */ e.createElement("path", { d: "M12 1.5H40C45.2467 1.5 49.5 5.75329 49.5 11V39C49.5 44.2467 45.2467 48.5 40 48.5H12C6.7533 48.5 2.5 44.2467 2.5 39V11C2.5 5.7533 6.75329 1.5 12 1.5Z", stroke: "#D5D7DA" }), /* @__PURE__ */ e.createElement("path", { d: "M34 19L23 30L18 25", stroke: "black", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("filter", { id: "filter0_dii_11785_12181", x: 0, y: 0, width: 52, height: 52, filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" }, /* @__PURE__ */ e.createElement("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }), /* @__PURE__ */ e.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), /* @__PURE__ */ e.createElement("feOffset", { dy: 1 }), /* @__PURE__ */ e.createElement("feGaussianBlur", { stdDeviation: 1 }), /* @__PURE__ */ e.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0" }), /* @__PURE__ */ e.createElement("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_11785_12181" }), /* @__PURE__ */ e.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_11785_12181", result: "shape" }), /* @__PURE__ */ e.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), /* @__PURE__ */ e.createElement("feOffset", { dy: -2 }), /* @__PURE__ */ e.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: -1, k3: 1 }), /* @__PURE__ */ e.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0" }), /* @__PURE__ */ e.createElement("feBlend", { mode: "normal", in2: "shape", result: "effect2_innerShadow_11785_12181" }), /* @__PURE__ */ e.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), /* @__PURE__ */ e.createElement("feMorphology", { radius: 1, operator: "erode", in: "SourceAlpha", result: "effect3_innerShadow_11785_12181" }), /* @__PURE__ */ e.createElement("feOffset", null), /* @__PURE__ */ e.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: -1, k3: 1 }), /* @__PURE__ */ e.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.18 0" }), /* @__PURE__ */ e.createElement("feBlend", { mode: "normal", in2: "effect2_innerShadow_11785_12181", result: "effect3_innerShadow_11785_12181" }))));
7
+ export {
8
+ l as default
9
+ };
10
+ //# sourceMappingURL=feature-icon-check.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-icon-check.svg.js","sources":["../../../src/assets/icons/feature-icon-check.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgFeatureIconCheck = ({\n title,\n titleId,\n ...props\n}) => /* @__PURE__ */ React.createElement(\"svg\", { width: 52, height: 52, viewBox: \"0 0 52 52\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", \"aria-labelledby\": titleId, ...props }, title ? /* @__PURE__ */ React.createElement(\"title\", { id: titleId }, title) : null, /* @__PURE__ */ React.createElement(\"g\", { filter: \"url(#filter0_dii_11785_12181)\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M2 11C2 5.47715 6.47715 1 12 1H40C45.5229 1 50 5.47715 50 11V39C50 44.5229 45.5228 49 40 49H12C6.47715 49 2 44.5228 2 39V11Z\", fill: \"white\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 1.5H40C45.2467 1.5 49.5 5.75329 49.5 11V39C49.5 44.2467 45.2467 48.5 40 48.5H12C6.7533 48.5 2.5 44.2467 2.5 39V11C2.5 5.7533 6.75329 1.5 12 1.5Z\", stroke: \"#D5D7DA\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M34 19L23 30L18 25\", stroke: \"black\", strokeWidth: 2, strokeLinecap: \"round\", strokeLinejoin: \"round\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"filter\", { id: \"filter0_dii_11785_12181\", x: 0, y: 0, width: 52, height: 52, filterUnits: \"userSpaceOnUse\", colorInterpolationFilters: \"sRGB\" }, /* @__PURE__ */ React.createElement(\"feFlood\", { floodOpacity: 0, result: \"BackgroundImageFix\" }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { in: \"SourceAlpha\", type: \"matrix\", values: \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\", result: \"hardAlpha\" }), /* @__PURE__ */ React.createElement(\"feOffset\", { dy: 1 }), /* @__PURE__ */ React.createElement(\"feGaussianBlur\", { stdDeviation: 1 }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { type: \"matrix\", values: \"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0\" }), /* @__PURE__ */ React.createElement(\"feBlend\", { mode: \"normal\", in2: \"BackgroundImageFix\", result: \"effect1_dropShadow_11785_12181\" }), /* @__PURE__ */ React.createElement(\"feBlend\", { mode: \"normal\", in: \"SourceGraphic\", in2: \"effect1_dropShadow_11785_12181\", result: \"shape\" }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { in: \"SourceAlpha\", type: \"matrix\", values: \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\", result: \"hardAlpha\" }), /* @__PURE__ */ React.createElement(\"feOffset\", { dy: -2 }), /* @__PURE__ */ React.createElement(\"feComposite\", { in2: \"hardAlpha\", operator: \"arithmetic\", k2: -1, k3: 1 }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { type: \"matrix\", values: \"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0\" }), /* @__PURE__ */ React.createElement(\"feBlend\", { mode: \"normal\", in2: \"shape\", result: \"effect2_innerShadow_11785_12181\" }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { in: \"SourceAlpha\", type: \"matrix\", values: \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\", result: \"hardAlpha\" }), /* @__PURE__ */ React.createElement(\"feMorphology\", { radius: 1, operator: \"erode\", in: \"SourceAlpha\", result: \"effect3_innerShadow_11785_12181\" }), /* @__PURE__ */ React.createElement(\"feOffset\", null), /* @__PURE__ */ React.createElement(\"feComposite\", { in2: \"hardAlpha\", operator: \"arithmetic\", k2: -1, k3: 1 }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { type: \"matrix\", values: \"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.18 0\" }), /* @__PURE__ */ React.createElement(\"feBlend\", { mode: \"normal\", in2: \"effect2_innerShadow_11785_12181\", result: \"effect3_innerShadow_11785_12181\" }))));\nexport default SvgFeatureIconCheck;\n"],"names":["SvgFeatureIconCheck","title","titleId","props","React"],"mappings":";AACK,MAACA,IAAsB,CAAC;AAAA,EAC3B,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,MAAsB,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,OAAO,8BAA8B,mBAAmBF,GAAS,GAAGC,EAAK,GAAIF,IAAwB,gBAAAG,EAAM,cAAc,SAAS,EAAE,IAAIF,EAAO,GAAID,CAAK,IAAI,MAAsB,gBAAAG,EAAM,cAAc,KAAK,EAAE,QAAQ,gCAA+B,GAAoB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,gIAAgI,MAAM,QAAO,CAAE,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,wJAAwJ,QAAQ,UAAS,CAAE,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,sBAAsB,QAAQ,SAAS,aAAa,GAAG,eAAe,SAAS,gBAAgB,QAAO,CAAE,CAAC,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,MAAsB,gBAAAA,EAAM,cAAc,UAAU,EAAE,IAAI,2BAA2B,GAAG,GAAG,GAAG,GAAG,OAAO,IAAI,QAAQ,IAAI,aAAa,kBAAkB,2BAA2B,OAAM,GAAoB,gBAAAA,EAAM,cAAc,WAAW,EAAE,cAAc,GAAG,QAAQ,qBAAoB,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,IAAI,eAAe,MAAM,UAAU,QAAQ,6CAA6C,QAAQ,YAAW,CAAE,GAAmB,gBAAAA,EAAM,cAAc,YAAY,EAAE,IAAI,GAAG,GAAmB,gBAAAA,EAAM,cAAc,kBAAkB,EAAE,cAAc,EAAC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,MAAM,UAAU,QAAQ,qEAAoE,CAAE,GAAmB,gBAAAA,EAAM,cAAc,WAAW,EAAE,MAAM,UAAU,KAAK,sBAAsB,QAAQ,iCAAgC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,WAAW,EAAE,MAAM,UAAU,IAAI,iBAAiB,KAAK,kCAAkC,QAAQ,QAAO,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,IAAI,eAAe,MAAM,UAAU,QAAQ,6CAA6C,QAAQ,YAAW,CAAE,GAAmB,gBAAAA,EAAM,cAAc,YAAY,EAAE,IAAI,GAAE,CAAE,GAAmB,gBAAAA,EAAM,cAAc,eAAe,EAAE,KAAK,aAAa,UAAU,cAAc,IAAI,IAAI,IAAI,EAAC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,MAAM,UAAU,QAAQ,qEAAoE,CAAE,GAAmB,gBAAAA,EAAM,cAAc,WAAW,EAAE,MAAM,UAAU,KAAK,SAAS,QAAQ,kCAAiC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,IAAI,eAAe,MAAM,UAAU,QAAQ,6CAA6C,QAAQ,YAAW,CAAE,GAAmB,gBAAAA,EAAM,cAAc,gBAAgB,EAAE,QAAQ,GAAG,UAAU,SAAS,IAAI,eAAe,QAAQ,kCAAiC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,YAAY,IAAI,GAAmB,gBAAAA,EAAM,cAAc,eAAe,EAAE,KAAK,aAAa,UAAU,cAAc,IAAI,IAAI,IAAI,EAAC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,MAAM,UAAU,QAAQ,qEAAoE,CAAE,GAAmB,gBAAAA,EAAM,cAAc,WAAW,EAAE,MAAM,UAAU,KAAK,mCAAmC,QAAQ,kCAAiC,CAAE,CAAC,CAAC,CAAC;"}
@@ -12,15 +12,15 @@ import { componentEvents as F } from "../../shared/constants.js";
12
12
  import { useAsyncError as K } from "../Common/hooks/useAsyncError.js";
13
13
  import "classnames";
14
14
  import { InternalError as P } from "../Common/InternalError/InternalError.js";
15
- import { snakeCaseToCamelCase as w } from "../../helpers/formattedStrings.js";
16
- import { useComponentContext as M } from "../../contexts/ComponentAdapter/useComponentContext.js";
15
+ import { useComponentContext as w } from "../../contexts/ComponentAdapter/useComponentContext.js";
16
+ import { snakeCaseToCamelCase as M } from "../../helpers/formattedStrings.js";
17
17
  import { useLoadingIndicator as O } from "../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
18
18
  const U = (t) => t.map((n) => n.message ? /* @__PURE__ */ o("li", { children: n.message }, n.key) : null), x = (t, n) => {
19
19
  const m = n ? n + "." : "";
20
20
  if (t.category === "invalid_attribute_value" || t.category === "invalid_operation")
21
21
  return [
22
22
  {
23
- key: w(m + t.errorKey),
23
+ key: M(m + t.errorKey),
24
24
  message: t.message ?? ""
25
25
  }
26
26
  ];
@@ -35,7 +35,7 @@ const U = (t) => t.map((n) => n.message ? /* @__PURE__ */ o("li", { children: n.
35
35
  LoaderComponent: m,
36
36
  onEvent: a
37
37
  }) => {
38
- const [r, l] = E(null), [c, f] = E(null), p = K(), { t: b } = B(), d = M(), { LoadingIndicator: I } = O(), u = m ?? I, v = g((e) => {
38
+ const [r, l] = E(null), [c, f] = E(null), p = K(), { t: b } = B(), d = w(), { LoadingIndicator: I } = O(), u = m ?? I, v = g((e) => {
39
39
  l(e), e || f(null);
40
40
  }, []), L = (e) => {
41
41
  l(e), e instanceof k && Array.isArray(e.errors) && f(e.errors.flatMap((s) => x(s)));
@@ -13,5 +13,6 @@ export type DataViewProps<T> = {
13
13
  footer?: useDataViewPropReturn<T>['footer'];
14
14
  isFetching?: boolean;
15
15
  variant?: TableProps['variant'];
16
+ emptyState?: useDataViewPropReturn<T>['emptyState'];
16
17
  };
17
- export declare const DataView: <T>({ pagination, isFetching, breakAt, breakpoints: customBreakpoints, footer, variant, ...dataViewProps }: DataViewProps<T>) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const DataView: <T>({ pagination, isFetching, breakAt, breakpoints: customBreakpoints, footer, variant, emptyState, ...dataViewProps }: DataViewProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,39 +1,40 @@
1
- import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
- import { useRef as b, useMemo as k } from "react";
3
- import { PaginationControl as C } from "../PaginationControl/PaginationControl.js";
4
- import D from "./DataView.module.scss.js";
5
- import { DataTable as w } from "./DataTable/DataTable.js";
6
- import { DataCards as x } from "./DataCards/DataCards.js";
7
- import { useContainerBreakpoints as h } from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
8
- const y = ({
1
+ import { jsxs as b, jsx as n } from "react/jsx-runtime";
2
+ import { useRef as k, useMemo as C } from "react";
3
+ import { PaginationControl as D } from "../PaginationControl/PaginationControl.js";
4
+ import w from "./DataView.module.scss.js";
5
+ import { DataTable as x } from "./DataTable/DataTable.js";
6
+ import { DataCards as h } from "./DataCards/DataCards.js";
7
+ import { useContainerBreakpoints as j } from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
8
+ const N = ({
9
9
  pagination: t,
10
10
  isFetching: s,
11
11
  breakAt: a = "small",
12
12
  breakpoints: i,
13
13
  footer: m,
14
14
  variant: p,
15
- ...c
15
+ emptyState: c,
16
+ ...l
16
17
  }) => {
17
- const e = b(null), o = h({
18
+ const e = k(null), o = j({
18
19
  ref: e,
19
20
  breakpoints: i
20
- }), l = o.length > 0, r = !o.includes(a), f = k(() => r ? x : w, [r]);
21
- return /* @__PURE__ */ u(
21
+ }), f = o.length > 0, r = !o.includes(a), d = C(() => r ? h : x, [r]);
22
+ return /* @__PURE__ */ b(
22
23
  "div",
23
24
  {
24
25
  "data-testid": "data-view",
25
- className: D.dataViewContainer,
26
- ref: (d) => {
27
- e.current = d;
26
+ className: w.dataViewContainer,
27
+ ref: (u) => {
28
+ e.current = u;
28
29
  },
29
30
  children: [
30
- l && /* @__PURE__ */ n(f, { ...c, footer: m, variant: p }),
31
- t && /* @__PURE__ */ n(C, { ...t, isFetching: s })
31
+ f && /* @__PURE__ */ n(d, { ...l, footer: m, variant: p, emptyState: c }),
32
+ t && /* @__PURE__ */ n(D, { ...t, isFetching: s })
32
33
  ]
33
34
  }
34
35
  );
35
36
  };
36
37
  export {
37
- y as DataView
38
+ N as DataView
38
39
  };
39
40
  //# sourceMappingURL=DataView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n variant?: TableProps['variant']\n}\n\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n variant,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && <Component {...dataViewProps} footer={footer} variant={variant} />}\n {pagination && <PaginationControl {...pagination} isFetching={isFetching} />}\n </div>\n )\n}\n"],"names":["DataView","pagination","isFetching","breakAt","customBreakpoints","footer","variant","dataViewProps","containerRef","useRef","breakpoints","useContainerBreakpoints","isBreakpointsDetected","isMobile","Component","useMemo","DataCards","DataTable","jsxs","styles","ref","jsx","PaginationControl"],"mappings":";;;;;;;AAwBO,MAAMA,IAAW,CAAK;AAAA,EAC3B,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAaC;AAAA,EACb,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,MAAwB;AACtB,QAAMC,IAAeC,EAA2B,IAAI,GAC9CC,IAAcC,EAAwB;AAAA,IAC1C,KAAKH;AAAA,IACL,aAAaJ;AAAA,EAAA,CACd,GAGKQ,IAAwBF,EAAY,SAAS,GAC7CG,IAAW,CAACH,EAAY,SAASP,CAAO,GAExCW,IAAYC,EAAQ,MACjBF,IAAWG,IAAYC,GAC7B,CAACJ,CAAQ,CAAC;AAEb,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWC,EAAO;AAAA,MAClB,KAAK,CAAAC,MAAO;AACV,QAAAZ,EAAa,UAAUY;AAAA,MACzB;AAAA,MAEC,UAAA;AAAA,QAAAR,KAAyB,gBAAAS,EAACP,GAAA,EAAW,GAAGP,GAAe,QAAAF,GAAgB,SAAAC,GAAkB;AAAA,QACzFL,KAAc,gBAAAoB,EAACC,GAAA,EAAmB,GAAGrB,GAAY,YAAAC,EAAA,CAAwB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhF;"}
1
+ {"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n variant?: TableProps['variant']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n}\n\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n variant,\n emptyState,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && (\n <Component {...dataViewProps} footer={footer} variant={variant} emptyState={emptyState} />\n )}\n {pagination && <PaginationControl {...pagination} isFetching={isFetching} />}\n </div>\n )\n}\n"],"names":["DataView","pagination","isFetching","breakAt","customBreakpoints","footer","variant","emptyState","dataViewProps","containerRef","useRef","breakpoints","useContainerBreakpoints","isBreakpointsDetected","isMobile","Component","useMemo","DataCards","DataTable","jsxs","styles","ref","jsx","PaginationControl"],"mappings":";;;;;;;AAyBO,MAAMA,IAAW,CAAK;AAAA,EAC3B,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAaC;AAAA,EACb,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,MAAwB;AACtB,QAAMC,IAAeC,EAA2B,IAAI,GAC9CC,IAAcC,EAAwB;AAAA,IAC1C,KAAKH;AAAA,IACL,aAAaL;AAAA,EAAA,CACd,GAGKS,IAAwBF,EAAY,SAAS,GAC7CG,IAAW,CAACH,EAAY,SAASR,CAAO,GAExCY,IAAYC,EAAQ,MACjBF,IAAWG,IAAYC,GAC7B,CAACJ,CAAQ,CAAC;AAEb,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWC,EAAO;AAAA,MAClB,KAAK,CAAAC,MAAO;AACV,QAAAZ,EAAa,UAAUY;AAAA,MACzB;AAAA,MAEC,UAAA;AAAA,QAAAR,uBACEE,GAAA,EAAW,GAAGP,GAAe,QAAAH,GAAgB,SAAAC,GAAkB,YAAAC,GAAwB;AAAA,QAEzFN,KAAc,gBAAAqB,EAACC,GAAA,EAAmB,GAAGtB,GAAY,YAAAC,EAAA,CAAwB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhF;"}
@@ -1,34 +1,34 @@
1
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
2
- import { useState as f } from "react";
3
- import { useTranslation as v } from "react-i18next";
4
- import { Flex as h } from "../Flex/Flex.js";
5
- import e from "./PaginationControl.module.scss.js";
6
- import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- import S from "../../../assets/icons/pagination_first.svg.js";
8
- import x from "../../../assets/icons/pagination_previous.svg.js";
9
- import I from "../../../assets/icons/pagination_next.svg.js";
10
- import L from "../../../assets/icons/pagination_last.svg.js";
11
- import { InlineSpinner as N } from "../InlineSpinner/InlineSpinner.js";
12
- const P = ({
1
+ import { jsx as n, jsxs as e } from "react/jsx-runtime";
2
+ import { useTranslation as C } from "react-i18next";
3
+ import { Flex as f } from "../Flex/Flex.js";
4
+ import l from "./PaginationControl.module.scss.js";
5
+ import { useComponentContext as r } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ import v from "../../../assets/icons/pagination_first.svg.js";
7
+ import h from "../../../assets/icons/pagination_previous.svg.js";
8
+ import x from "../../../assets/icons/pagination_next.svg.js";
9
+ import S from "../../../assets/icons/pagination_last.svg.js";
10
+ import { InlineSpinner as I } from "../InlineSpinner/InlineSpinner.js";
11
+ const L = ({
13
12
  currentPage: i,
14
13
  totalPages: o,
15
- isFetching: c,
16
- handleFirstPage: m,
17
- handlePreviousPage: p,
18
- handleNextPage: g,
14
+ isFetching: s,
15
+ handleFirstPage: c,
16
+ handlePreviousPage: m,
17
+ handleNextPage: p,
19
18
  handleLastPage: d,
20
- handleItemsPerPageChange: u
19
+ handleItemsPerPageChange: g,
20
+ itemsPerPage: u = 5
21
21
  }) => {
22
- const { t } = v("common"), a = s(), [b, C] = f("5");
23
- return o < 2 ? null : /* @__PURE__ */ n("section", { className: e.paginationControl, "data-testid": "pagination-control", children: /* @__PURE__ */ r(h, { justifyContent: "space-between", alignItems: "center", children: [
24
- /* @__PURE__ */ n("div", { className: e.paginationControlCount, children: /* @__PURE__ */ n("section", { children: /* @__PURE__ */ n(
22
+ const { t } = C("common"), a = r();
23
+ return o < 2 ? null : /* @__PURE__ */ n("section", { className: l.paginationControl, "data-testid": "pagination-control", children: /* @__PURE__ */ e(f, { justifyContent: "space-between", alignItems: "center", children: [
24
+ /* @__PURE__ */ n("div", { className: l.paginationControlCount, children: /* @__PURE__ */ n("section", { children: /* @__PURE__ */ n(
25
25
  a.Select,
26
26
  {
27
27
  label: t("labels.paginationControllCountLabel"),
28
28
  shouldVisuallyHideLabel: !0,
29
- value: b,
30
- onChange: (l) => {
31
- C(l), u(Number(l));
29
+ value: u.toString(),
30
+ onChange: (b) => {
31
+ g(Number(b));
32
32
  },
33
33
  options: [
34
34
  { value: "5", label: "5" },
@@ -37,15 +37,15 @@ const P = ({
37
37
  ]
38
38
  }
39
39
  ) }) }),
40
- /* @__PURE__ */ r("div", { className: e.paginationControlButtons, children: [
41
- c && /* @__PURE__ */ n(N, { ariaLabel: t("labels.paginationFetchingLabel") }),
40
+ /* @__PURE__ */ e("div", { className: l.paginationControlButtons, children: [
41
+ s && /* @__PURE__ */ n(I, { ariaLabel: t("labels.paginationFetchingLabel") }),
42
42
  /* @__PURE__ */ n(
43
43
  a.ButtonIcon,
44
44
  {
45
45
  "aria-label": t("icons.paginationFirst"),
46
46
  isDisabled: i === 1,
47
- onClick: m,
48
- children: /* @__PURE__ */ n(S, {})
47
+ onClick: c,
48
+ children: /* @__PURE__ */ n(v, {})
49
49
  }
50
50
  ),
51
51
  /* @__PURE__ */ n(
@@ -54,8 +54,8 @@ const P = ({
54
54
  "aria-label": t("icons.paginationPrev"),
55
55
  "data-testid": "pagination-previous",
56
56
  isDisabled: i === 1,
57
- onClick: p,
58
- children: /* @__PURE__ */ n(x, {})
57
+ onClick: m,
58
+ children: /* @__PURE__ */ n(h, {})
59
59
  }
60
60
  ),
61
61
  /* @__PURE__ */ n(
@@ -64,8 +64,8 @@ const P = ({
64
64
  "aria-label": t("icons.paginationNext"),
65
65
  "data-testid": "pagination-next",
66
66
  isDisabled: i === o,
67
- onClick: g,
68
- children: /* @__PURE__ */ n(I, {})
67
+ onClick: p,
68
+ children: /* @__PURE__ */ n(x, {})
69
69
  }
70
70
  ),
71
71
  /* @__PURE__ */ n(
@@ -74,16 +74,16 @@ const P = ({
74
74
  "aria-label": t("icons.paginationLast"),
75
75
  isDisabled: i === o,
76
76
  onClick: d,
77
- children: /* @__PURE__ */ n(L, {})
77
+ children: /* @__PURE__ */ n(S, {})
78
78
  }
79
79
  )
80
80
  ] })
81
81
  ] }) });
82
- }, q = (i) => {
83
- const o = s();
84
- return o.PaginationControl ? /* @__PURE__ */ n(o.PaginationControl, { ...i }) : /* @__PURE__ */ n(P, { ...i });
82
+ }, T = (i) => {
83
+ const o = r();
84
+ return o.PaginationControl ? /* @__PURE__ */ n(o.PaginationControl, { ...i }) : /* @__PURE__ */ n(L, { ...i });
85
85
  };
86
86
  export {
87
- q as PaginationControl
87
+ T as PaginationControl
88
88
  };
89
89
  //# sourceMappingURL=PaginationControl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Flex } from '../Flex/Flex'\nimport { InlineSpinner } from '../InlineSpinner'\nimport style from './PaginationControl.module.scss'\nimport type { PaginationControlProps } from './PaginationControlTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport PaginationFirstIcon from '@/assets/icons/pagination_first.svg?react'\nimport PaginationPrevIcon from '@/assets/icons/pagination_previous.svg?react'\nimport PaginationNextIcon from '@/assets/icons/pagination_next.svg?react'\nimport PaginationLastIcon from '@/assets/icons/pagination_last.svg?react'\n\nconst DefaultPaginationControl = ({\n currentPage,\n totalPages,\n isFetching,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n}: PaginationControlProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n const [pageSize, setPageSize] = useState('5')\n\n if (totalPages < 2) {\n return null\n }\n return (\n <section className={style.paginationControl} data-testid=\"pagination-control\">\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <div className={style.paginationControlCount}>\n <section>\n <Components.Select\n label={t('labels.paginationControllCountLabel')}\n shouldVisuallyHideLabel\n value={pageSize}\n onChange={n => {\n setPageSize(n)\n handleItemsPerPageChange(Number(n))\n }}\n options={[\n { value: '5', label: '5' },\n { value: '10', label: '10' },\n { value: '50', label: '50' },\n ]}\n />\n </section>\n </div>\n <div className={style.paginationControlButtons}>\n {isFetching && <InlineSpinner ariaLabel={t('labels.paginationFetchingLabel')} />}\n <Components.ButtonIcon\n aria-label={t('icons.paginationFirst')}\n isDisabled={currentPage === 1}\n onClick={handleFirstPage}\n >\n <PaginationFirstIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationPrev')}\n data-testid=\"pagination-previous\"\n isDisabled={currentPage === 1}\n onClick={handlePreviousPage}\n >\n <PaginationPrevIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationNext')}\n data-testid=\"pagination-next\"\n isDisabled={currentPage === totalPages}\n onClick={handleNextPage}\n >\n <PaginationNextIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationLast')}\n isDisabled={currentPage === totalPages}\n onClick={handleLastPage}\n >\n <PaginationLastIcon />\n </Components.ButtonIcon>\n </div>\n </Flex>\n </section>\n )\n}\n\nexport const PaginationControl = (props: PaginationControlProps) => {\n const Components = useComponentContext()\n\n return Components.PaginationControl ? (\n <Components.PaginationControl {...props} />\n ) : (\n <DefaultPaginationControl {...props} />\n )\n}\n"],"names":["DefaultPaginationControl","currentPage","totalPages","isFetching","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","useTranslation","Components","useComponentContext","pageSize","setPageSize","useState","jsx","style","jsxs","Flex","n","InlineSpinner","PaginationFirstIcon","PaginationPrevIcon","PaginationNextIcon","PaginationLastIcon","PaginationControl","props"],"mappings":";;;;;;;;;;;AAYA,MAAMA,IAA2B,CAAC;AAAA,EAChC,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,0BAAAC;AACF,MAA8B;AAC5B,QAAM,EAAE,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA,GACb,CAACC,GAAUC,CAAW,IAAIC,EAAS,GAAG;AAE5C,SAAIZ,IAAa,IACR,OAGP,gBAAAa,EAAC,WAAA,EAAQ,WAAWC,EAAM,mBAAmB,eAAY,sBACvD,UAAA,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA;AAAA,IAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWC,EAAM,wBACpB,4BAAC,WAAA,EACC,UAAA,gBAAAD;AAAA,MAACL,EAAW;AAAA,MAAX;AAAA,QACC,OAAO,EAAE,qCAAqC;AAAA,QAC9C,yBAAuB;AAAA,QACvB,OAAOE;AAAA,QACP,UAAU,CAAAO,MAAK;AACb,UAAAN,EAAYM,CAAC,GACbX,EAAyB,OAAOW,CAAC,CAAC;AAAA,QACpC;AAAA,QACA,SAAS;AAAA,UACP,EAAE,OAAO,KAAK,OAAO,IAAA;AAAA,UACrB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,UACtB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,QAAK;AAAA,MAC7B;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,IACA,gBAAAF,EAAC,OAAA,EAAI,WAAWD,EAAM,0BACnB,UAAA;AAAA,MAAAb,KAAc,gBAAAY,EAACK,GAAA,EAAc,WAAW,EAAE,gCAAgC,GAAG;AAAA,MAC9E,gBAAAL;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,uBAAuB;AAAA,UACrC,YAAYT,MAAgB;AAAA,UAC5B,SAASG;AAAA,UAET,4BAACiB,GAAA,CAAA,CAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEvB,gBAAAN;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYT,MAAgB;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACiB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAP;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYT,MAAgBC;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACiB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAR;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,sBAAsB;AAAA,UACpC,YAAYT,MAAgBC;AAAA,UAC5B,SAASK;AAAA,UAET,4BAACiB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,IACtB,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ,GAEaC,IAAoB,CAACC,MAAkC;AAClE,QAAMhB,IAAaC,EAAA;AAEnB,SAAOD,EAAW,oBAChB,gBAAAK,EAACL,EAAW,mBAAX,EAA8B,GAAGgB,EAAA,CAAO,IAEzC,gBAAAX,EAACf,GAAA,EAA0B,GAAG0B,EAAA,CAAO;AAEzC;"}
1
+ {"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '../Flex/Flex'\nimport { InlineSpinner } from '../InlineSpinner'\nimport style from './PaginationControl.module.scss'\nimport type { PaginationControlProps, PaginationItemsPerPage } from './PaginationControlTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport PaginationFirstIcon from '@/assets/icons/pagination_first.svg?react'\nimport PaginationPrevIcon from '@/assets/icons/pagination_previous.svg?react'\nimport PaginationNextIcon from '@/assets/icons/pagination_next.svg?react'\nimport PaginationLastIcon from '@/assets/icons/pagination_last.svg?react'\n\nconst DefaultPaginationControl = ({\n currentPage,\n totalPages,\n isFetching,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n itemsPerPage = 5,\n}: PaginationControlProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n if (totalPages < 2) {\n return null\n }\n\n return (\n <section className={style.paginationControl} data-testid=\"pagination-control\">\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <div className={style.paginationControlCount}>\n <section>\n <Components.Select\n label={t('labels.paginationControllCountLabel')}\n shouldVisuallyHideLabel\n value={itemsPerPage.toString()}\n onChange={n => {\n handleItemsPerPageChange(Number(n) as PaginationItemsPerPage)\n }}\n options={[\n { value: '5', label: '5' },\n { value: '10', label: '10' },\n { value: '50', label: '50' },\n ]}\n />\n </section>\n </div>\n <div className={style.paginationControlButtons}>\n {isFetching && <InlineSpinner ariaLabel={t('labels.paginationFetchingLabel')} />}\n <Components.ButtonIcon\n aria-label={t('icons.paginationFirst')}\n isDisabled={currentPage === 1}\n onClick={handleFirstPage}\n >\n <PaginationFirstIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationPrev')}\n data-testid=\"pagination-previous\"\n isDisabled={currentPage === 1}\n onClick={handlePreviousPage}\n >\n <PaginationPrevIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationNext')}\n data-testid=\"pagination-next\"\n isDisabled={currentPage === totalPages}\n onClick={handleNextPage}\n >\n <PaginationNextIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationLast')}\n isDisabled={currentPage === totalPages}\n onClick={handleLastPage}\n >\n <PaginationLastIcon />\n </Components.ButtonIcon>\n </div>\n </Flex>\n </section>\n )\n}\n\nexport const PaginationControl = (props: PaginationControlProps) => {\n const Components = useComponentContext()\n\n return Components.PaginationControl ? (\n <Components.PaginationControl {...props} />\n ) : (\n <DefaultPaginationControl {...props} />\n )\n}\n"],"names":["DefaultPaginationControl","currentPage","totalPages","isFetching","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","itemsPerPage","useTranslation","Components","useComponentContext","jsx","style","jsxs","Flex","n","InlineSpinner","PaginationFirstIcon","PaginationPrevIcon","PaginationNextIcon","PaginationLastIcon","PaginationControl","props"],"mappings":";;;;;;;;;;AAWA,MAAMA,IAA2B,CAAC;AAAA,EAChC,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,MAA8B;AAC5B,QAAM,EAAE,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA;AAEnB,SAAIV,IAAa,IACR,OAIP,gBAAAW,EAAC,WAAA,EAAQ,WAAWC,EAAM,mBAAmB,eAAY,sBACvD,UAAA,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA;AAAA,IAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWC,EAAM,wBACpB,4BAAC,WAAA,EACC,UAAA,gBAAAD;AAAA,MAACF,EAAW;AAAA,MAAX;AAAA,QACC,OAAO,EAAE,qCAAqC;AAAA,QAC9C,yBAAuB;AAAA,QACvB,OAAOF,EAAa,SAAA;AAAA,QACpB,UAAU,CAAAQ,MAAK;AACb,UAAAT,EAAyB,OAAOS,CAAC,CAA2B;AAAA,QAC9D;AAAA,QACA,SAAS;AAAA,UACP,EAAE,OAAO,KAAK,OAAO,IAAA;AAAA,UACrB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,UACtB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,QAAK;AAAA,MAC7B;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,IACA,gBAAAF,EAAC,OAAA,EAAI,WAAWD,EAAM,0BACnB,UAAA;AAAA,MAAAX,KAAc,gBAAAU,EAACK,GAAA,EAAc,WAAW,EAAE,gCAAgC,GAAG;AAAA,MAC9E,gBAAAL;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,uBAAuB;AAAA,UACrC,YAAYV,MAAgB;AAAA,UAC5B,SAASG;AAAA,UAET,4BAACe,GAAA,CAAA,CAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEvB,gBAAAN;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYV,MAAgB;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACe,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAP;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYV,MAAgBC;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACe,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAR;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,sBAAsB;AAAA,UACpC,YAAYV,MAAgBC;AAAA,UAC5B,SAASK;AAAA,UAET,4BAACe,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,IACtB,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ,GAEaC,IAAoB,CAACC,MAAkC;AAClE,QAAMb,IAAaC,EAAA;AAEnB,SAAOD,EAAW,oBAChB,gBAAAE,EAACF,EAAW,mBAAX,EAA8B,GAAGa,EAAA,CAAO,IAEzC,gBAAAX,EAACb,GAAA,EAA0B,GAAGwB,EAAA,CAAO;AAEzC;"}
@@ -1,10 +1,12 @@
1
+ export type PaginationItemsPerPage = 5 | 10 | 50;
1
2
  export type PaginationControlProps = {
2
3
  handleFirstPage: () => void;
3
4
  handlePreviousPage: () => void;
4
5
  handleNextPage: () => void;
5
6
  handleLastPage: () => void;
6
- handleItemsPerPageChange: (n: number) => void;
7
+ handleItemsPerPageChange: (n: PaginationItemsPerPage) => void;
7
8
  currentPage: number;
8
9
  totalPages: number;
10
+ itemsPerPage: PaginationItemsPerPage;
9
11
  isFetching?: boolean;
10
12
  };
@@ -2,27 +2,30 @@ import { jsx as r } from "react/jsx-runtime";
2
2
  import { z as o } from "zod";
3
3
  import { useForm as s, FormProvider as a } from "react-hook-form";
4
4
  import { zodResolver as l } from "@hookform/resolvers/zod";
5
- import t from "./SignatureForm.module.scss.js";
5
+ import e from "./SignatureForm.module.scss.js";
6
6
  import { Form as u } from "../Form/Form.js";
7
7
  import { Flex as c } from "../Flex/Flex.js";
8
- import "react-i18next";
9
8
  import "classnames";
10
- const f = o.object({
9
+ import "../../../shared/constants.js";
10
+ import "react-i18next";
11
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "react";
13
+ const p = o.object({
11
14
  signature: o.string().min(1),
12
15
  confirmSignature: o.literal(!0)
13
- }), p = {
16
+ }), f = {
14
17
  signature: ""
15
18
  };
16
- function z({ onSubmit: m, children: i, formProps: n }) {
17
- const e = s({
18
- resolver: l(f),
19
- defaultValues: p,
19
+ function V({ onSubmit: m, children: i, formProps: n }) {
20
+ const t = s({
21
+ resolver: l(p),
22
+ defaultValues: f,
20
23
  ...n
21
24
  });
22
- return /* @__PURE__ */ r(a, { ...e, children: /* @__PURE__ */ r(u, { onSubmit: e.handleSubmit(m), className: t.container, children: /* @__PURE__ */ r("div", { className: t.formFields, children: /* @__PURE__ */ r(c, { flexDirection: "column", gap: 20, children: i }) }) }) });
25
+ return /* @__PURE__ */ r(a, { ...t, children: /* @__PURE__ */ r(u, { onSubmit: t.handleSubmit(m), className: e.container, children: /* @__PURE__ */ r("div", { className: e.formFields, children: /* @__PURE__ */ r(c, { flexDirection: "column", gap: 20, children: i }) }) }) });
23
26
  }
24
27
  export {
25
- z as SignatureForm,
26
- f as SignatureFormSchema
28
+ V as SignatureForm,
29
+ p as SignatureFormSchema
27
30
  };
28
31
  //# sourceMappingURL=SignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = z.object({\n signature: z.string().min(1),\n confirmSignature: z.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = z.infer<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: zodResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","z","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","zodResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":";;;;;;;;;AAOO,MAAMA,IAAsBC,EAAE,OAAO;AAAA,EAC1C,WAAWA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC3B,kBAAkBA,EAAE,QAAQ,EAAI;AAClC,CAAC,GAEKC,IAA6B;AAAA,EACjC,WAAW;AACb;AAUO,SAASC,EAAc,EAAE,UAAAC,GAAU,UAAAC,GAAU,WAAAC,KAAiC;AACnF,QAAMC,IAAUC,EAA6B;AAAA,IAC3C,UAAUC,EAAYT,CAAmB;AAAA,IACzC,eAAeE;AAAA,IACf,GAAGI;AAAA,EAAA,CACJ;AAED,SACE,gBAAAI,EAACC,GAAA,EAAc,GAAGJ,GAChB,UAAA,gBAAAG,EAACE,GAAA,EAAK,UAAUL,EAAQ,aAAaH,CAAQ,GAAG,WAAWS,EAAO,WAChE,UAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWG,EAAO,YACrB,UAAA,gBAAAH,EAACI,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,EAAA,CACH,EAAA,CACF,EAAA,CACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = z.object({\n signature: z.string().min(1),\n confirmSignature: z.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = z.infer<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: zodResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","z","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","zodResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":";;;;;;;;;;;;AAOO,MAAMA,IAAsBC,EAAE,OAAO;AAAA,EAC1C,WAAWA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC3B,kBAAkBA,EAAE,QAAQ,EAAI;AAClC,CAAC,GAEKC,IAA6B;AAAA,EACjC,WAAW;AACb;AAUO,SAASC,EAAc,EAAE,UAAAC,GAAU,UAAAC,GAAU,WAAAC,KAAiC;AACnF,QAAMC,IAAUC,EAA6B;AAAA,IAC3C,UAAUC,EAAYT,CAAmB;AAAA,IACzC,eAAeE;AAAA,IACf,GAAGI;AAAA,EAAA,CACJ;AAED,SACE,gBAAAI,EAACC,GAAA,EAAc,GAAGJ,GAChB,UAAA,gBAAAG,EAACE,GAAA,EAAK,UAAUL,EAAQ,aAAaH,CAAQ,GAAG,WAAWS,EAAO,WAChE,UAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWG,EAAO,YACrB,UAAA,gBAAAH,EAACI,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,EAAA,CACH,EAAA,CACF,EAAA,CACF,GACF;AAEJ;"}
@@ -1,21 +1,23 @@
1
1
  import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
- import "react-i18next";
3
2
  import "classnames";
4
- import { ActionsLayout as s } from "../ActionsLayout/ActionsLayout.js";
5
- import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
- function d({
3
+ import "../../../shared/constants.js";
4
+ import "react-i18next";
5
+ import { ActionsLayout as p } from "../ActionsLayout/ActionsLayout.js";
6
+ import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import "react";
8
+ function y({
7
9
  onBack: t,
8
10
  backLabel: r,
9
11
  submitLabel: i,
10
12
  isLoading: e = !1
11
13
  }) {
12
- const o = p();
13
- return /* @__PURE__ */ m(s, { children: [
14
+ const o = s();
15
+ return /* @__PURE__ */ m(p, { children: [
14
16
  t && /* @__PURE__ */ n(o.Button, { variant: "secondary", type: "button", onClick: t, children: r }),
15
17
  /* @__PURE__ */ n(o.Button, { type: "submit", isLoading: e, children: i })
16
18
  ] });
17
19
  }
18
20
  export {
19
- d as SignatureFormActions
21
+ y as SignatureFormActions
20
22
  };
21
23
  //# sourceMappingURL=SignatureFormActions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureFormActions.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormActions.tsx"],"sourcesContent":["import { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface SignatureFormActionsProps {\n onBack?: () => void\n backLabel: string\n submitLabel: string\n isLoading?: boolean\n}\n\nexport function SignatureFormActions({\n onBack,\n backLabel,\n submitLabel,\n isLoading = false,\n}: SignatureFormActionsProps) {\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {onBack && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onBack}>\n {backLabel}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isLoading}>\n {submitLabel}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["SignatureFormActions","onBack","backLabel","submitLabel","isLoading","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAUO,SAASA,EAAqB;AAAA,EACnC,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAA8B;AAC5B,QAAMC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACE,UAAA;AAAA,IAAAN,KACC,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASJ,GAC3D,UAAAC,EAAA,CACH;AAAA,sBAEDG,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAAD,GAC9B,UAAAD,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"SignatureFormActions.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormActions.tsx"],"sourcesContent":["import { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface SignatureFormActionsProps {\n onBack?: () => void\n backLabel: string\n submitLabel: string\n isLoading?: boolean\n}\n\nexport function SignatureFormActions({\n onBack,\n backLabel,\n submitLabel,\n isLoading = false,\n}: SignatureFormActionsProps) {\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {onBack && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onBack}>\n {backLabel}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isLoading}>\n {submitLabel}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["SignatureFormActions","onBack","backLabel","submitLabel","isLoading","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAUO,SAASA,EAAqB;AAAA,EACnC,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAA8B;AAC5B,QAAMC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACE,UAAA;AAAA,IAAAN,KACC,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASJ,GAC3D,UAAAC,EAAA,CACH;AAAA,sBAEDG,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAAD,GAC9B,UAAAD,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,28 +1,31 @@
1
- import { jsxs as n, Fragment as s, jsx as e } from "react/jsx-runtime";
2
- import "react-i18next";
1
+ import { jsxs as n, Fragment as s, jsx as r } from "react/jsx-runtime";
3
2
  import "classnames";
4
- import { TextInputField as a } from "../Fields/TextInputField/TextInputField.js";
5
- import { CheckboxField as u } from "../Fields/CheckboxField/CheckboxField.js";
6
- function f({
7
- signatureLabel: r,
3
+ import "../../../shared/constants.js";
4
+ import "react-i18next";
5
+ import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
6
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import "react";
8
+ import { CheckboxField as a } from "../Fields/CheckboxField/CheckboxField.js";
9
+ function b({
10
+ signatureLabel: e,
8
11
  signatureDescription: i = "",
9
12
  signatureError: t = "",
10
13
  confirmationLabel: o,
11
14
  confirmationError: m = ""
12
15
  }) {
13
16
  return /* @__PURE__ */ n(s, { children: [
14
- /* @__PURE__ */ e(
15
- a,
17
+ /* @__PURE__ */ r(
18
+ p,
16
19
  {
17
20
  name: "signature",
18
- label: r,
21
+ label: e,
19
22
  description: i,
20
23
  errorMessage: t,
21
24
  isRequired: !0
22
25
  }
23
26
  ),
24
- /* @__PURE__ */ e(
25
- u,
27
+ /* @__PURE__ */ r(
28
+ a,
26
29
  {
27
30
  name: "confirmSignature",
28
31
  isRequired: !0,
@@ -33,6 +36,6 @@ function f({
33
36
  ] });
34
37
  }
35
38
  export {
36
- f as SignatureFormFields
39
+ b as SignatureFormFields
37
40
  };
38
41
  //# sourceMappingURL=SignatureFormFields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":";;;;;AAUO,SAASA,EAAoB;AAAA,EAClC,gBAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AAAA,EACjB,mBAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAA6B;AAC3B,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR;AAAA,QACP,aAAaC;AAAA,QACb,cAAcC;AAAA,QACd,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAK;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON;AAAA,QACP,cAAcC;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":";;;;;;;;AAUO,SAASA,EAAoB;AAAA,EAClC,gBAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AAAA,EACjB,mBAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAA6B;AAC3B,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR;AAAA,QACP,aAAaC;AAAA,QACb,cAAcC;AAAA,QACd,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAK;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON;AAAA,QACP,cAAcC;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as o, jsxs as y, Fragment as f } from "react/jsx-runtime";
2
2
  import { z as e } from "zod";
3
- import { useForm as d, FormProvider as p } from "react-hook-form";
3
+ import { useForm as p, FormProvider as d } from "react-hook-form";
4
4
  import { zodResolver as N } from "@hookform/resolvers/zod";
5
5
  import { SignatoryForm as _ } from "./SignatoryForm.js";
6
6
  import { Head as O } from "./Head.js";
@@ -8,12 +8,14 @@ import { AssignSignatorySelection as u } from "./AssignSignatorySelection.js";
8
8
  import { SignatoryAssignmentMode as m, AssignSignatoryProvider as E } from "./useAssignSignatory.js";
9
9
  import { companyEvents as i } from "../../../shared/constants.js";
10
10
  import { Flex as C } from "../../Common/Flex/Flex.js";
11
- import "react-i18next";
12
11
  import "classnames";
12
+ import "react-i18next";
13
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import "react";
13
15
  import { BaseComponent as M } from "../../Base/Base.js";
14
16
  import { useBase as h } from "../../Base/useBase.js";
15
17
  import { useI18n as I, useComponentDictionary as Y } from "../../../i18n/I18n.js";
16
- function K(n) {
18
+ function Q(n) {
17
19
  return /* @__PURE__ */ o(M, { ...n, children: /* @__PURE__ */ o(v, { ...n, children: n.children }) });
18
20
  }
19
21
  const D = e.object({
@@ -31,7 +33,7 @@ function v({
31
33
  dictionary: A
32
34
  }) {
33
35
  I("Company.AssignSignatory"), Y("Company.AssignSignatory", A);
34
- const { onEvent: t } = h(), c = d({
36
+ const { onEvent: t } = h(), c = p({
35
37
  resolver: N(D),
36
38
  defaultValues: {
37
39
  signatoryAssignmentMode: m.createSignatory
@@ -51,7 +53,7 @@ function v({
51
53
  r === i.COMPANY_CREATE_SIGNATORY_DONE ? t(i.COMPANY_ASSIGN_SIGNATORY_DONE) : r === i.COMPANY_INVITE_SIGNATORY_DONE ? t(i.COMPANY_ASSIGN_SIGNATORY_DONE) : t(r, l);
52
54
  }
53
55
  },
54
- children: /* @__PURE__ */ o(C, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(p, { ...c, children: s || /* @__PURE__ */ y(f, { children: [
56
+ children: /* @__PURE__ */ o(C, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(d, { ...c, children: s || /* @__PURE__ */ y(f, { children: [
55
57
  /* @__PURE__ */ o(O, {}),
56
58
  /* @__PURE__ */ o(u, {}),
57
59
  /* @__PURE__ */ o(_, {})
@@ -60,6 +62,6 @@ function v({
60
62
  ) });
61
63
  }
62
64
  export {
63
- K as AssignSignatory
65
+ Q as AssignSignatory
64
66
  };
65
67
  //# sourceMappingURL=AssignSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/AssignSignatory.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { SignatoryForm } from './SignatoryForm'\nimport { Head } from './Head'\nimport { AssignSignatorySelection } from './AssignSignatorySelection'\nimport type { AssignSignatoryDefaultValues } from './useAssignSignatory'\nimport { AssignSignatoryProvider, SignatoryAssignmentMode } from './useAssignSignatory'\nimport { companyEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport { useBase, BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useI18n, useComponentDictionary } from '@/i18n'\n\ninterface AssignSignatoryProps extends BaseComponentInterface<'Company.AssignSignatory'> {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n}\n\nexport function AssignSignatory(props: AssignSignatoryProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst AssignSignatorySelectionSchema = z.object({\n signatoryAssignmentMode: z.union([\n z.literal(SignatoryAssignmentMode.createSignatory),\n z.literal(SignatoryAssignmentMode.inviteSignatory),\n ]),\n})\n\ntype AssignSignatorySelectionInputs = z.infer<typeof AssignSignatorySelectionSchema>\n\nfunction Root({\n companyId,\n signatoryId,\n defaultValues,\n className,\n children,\n dictionary,\n}: AssignSignatoryProps) {\n useI18n('Company.AssignSignatory')\n useComponentDictionary('Company.AssignSignatory', dictionary)\n\n const { onEvent } = useBase()\n\n const formMethods = useForm<AssignSignatorySelectionInputs>({\n resolver: zodResolver(AssignSignatorySelectionSchema),\n defaultValues: {\n signatoryAssignmentMode: SignatoryAssignmentMode.createSignatory,\n },\n })\n\n const onSignatoryAssignmentModeChange = (mode: string) => {\n onEvent(companyEvents.COMPANY_ASSIGN_SIGNATORY_MODE_UPDATED, mode)\n }\n\n const onSignatoryFormEvent: BaseComponentInterface['onEvent'] = (event, data) => {\n if (event === companyEvents.COMPANY_CREATE_SIGNATORY_DONE) {\n onEvent(companyEvents.COMPANY_ASSIGN_SIGNATORY_DONE)\n } else if (event === companyEvents.COMPANY_INVITE_SIGNATORY_DONE) {\n onEvent(companyEvents.COMPANY_ASSIGN_SIGNATORY_DONE)\n } else {\n onEvent(event, data)\n }\n }\n\n return (\n <section className={className}>\n <AssignSignatoryProvider\n value={{\n companyId,\n signatoryId,\n defaultValues,\n onSignatoryAssignmentModeChange,\n onSignatoryFormEvent,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n <FormProvider {...formMethods}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <AssignSignatorySelection />\n <SignatoryForm />\n </>\n )}\n </FormProvider>\n </Flex>\n </AssignSignatoryProvider>\n </section>\n )\n}\n"],"names":["AssignSignatory","props","jsx","BaseComponent","Root","AssignSignatorySelectionSchema","z","SignatoryAssignmentMode","companyId","signatoryId","defaultValues","className","children","dictionary","useI18n","useComponentDictionary","onEvent","useBase","formMethods","useForm","zodResolver","AssignSignatoryProvider","mode","companyEvents","event","data","Flex","FormProvider","jsxs","Fragment","Head","AssignSignatorySelection","SignatoryForm"],"mappings":";;;;;;;;;;;;;;;AAmBO,SAASA,EAAgBC,GAA6B;AAC3D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMI,IAAiCC,EAAE,OAAO;AAAA,EAC9C,yBAAyBA,EAAE,MAAM;AAAA,IAC/BA,EAAE,QAAQC,EAAwB,eAAe;AAAA,IACjDD,EAAE,QAAQC,EAAwB,eAAe;AAAA,EAAA,CAClD;AACH,CAAC;AAID,SAASH,EAAK;AAAA,EACZ,WAAAI;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,GAAyB;AACvB,EAAAC,EAAQ,yBAAyB,GACjCC,EAAuB,2BAA2BF,CAAU;AAE5D,QAAM,EAAE,SAAAG,EAAA,IAAYC,EAAA,GAEdC,IAAcC,EAAwC;AAAA,IAC1D,UAAUC,EAAYf,CAA8B;AAAA,IACpD,eAAe;AAAA,MACb,yBAAyBE,EAAwB;AAAA,IAAA;AAAA,EACnD,CACD;AAgBD,SACE,gBAAAL,EAAC,aAAQ,WAAAS,GACP,UAAA,gBAAAT;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAb;AAAA,QACA,aAAAC;AAAA,QACA,eAAAC;AAAA,QACA,iCArBgC,CAACY,MAAiB;AACxD,UAAAN,EAAQO,EAAc,uCAAuCD,CAAI;AAAA,QACnE;AAAA,QAoBQ,sBAlBwD,CAACE,GAAOC,MAAS;AAC/E,UAAID,MAAUD,EAAc,gCAC1BP,EAAQO,EAAc,6BAA6B,IAC1CC,MAAUD,EAAc,gCACjCP,EAAQO,EAAc,6BAA6B,IAEnDP,EAAQQ,GAAOC,CAAI;AAAA,QAEvB;AAAA,MAUQ;AAAA,MAGF,UAAA,gBAAAvB,EAACwB,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAxB,EAACyB,GAAA,EAAc,GAAGT,GACf,UAAAN,KAGC,gBAAAgB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAyB;AAAA,0BACzBC,GAAA,CAAA,CAAc;AAAA,MAAA,EAAA,CACjB,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"AssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/AssignSignatory.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { SignatoryForm } from './SignatoryForm'\nimport { Head } from './Head'\nimport { AssignSignatorySelection } from './AssignSignatorySelection'\nimport type { AssignSignatoryDefaultValues } from './useAssignSignatory'\nimport { AssignSignatoryProvider, SignatoryAssignmentMode } from './useAssignSignatory'\nimport { companyEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport { useBase, BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useI18n, useComponentDictionary } from '@/i18n'\n\ninterface AssignSignatoryProps extends BaseComponentInterface<'Company.AssignSignatory'> {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n}\n\nexport function AssignSignatory(props: AssignSignatoryProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst AssignSignatorySelectionSchema = z.object({\n signatoryAssignmentMode: z.union([\n z.literal(SignatoryAssignmentMode.createSignatory),\n z.literal(SignatoryAssignmentMode.inviteSignatory),\n ]),\n})\n\ntype AssignSignatorySelectionInputs = z.infer<typeof AssignSignatorySelectionSchema>\n\nfunction Root({\n companyId,\n signatoryId,\n defaultValues,\n className,\n children,\n dictionary,\n}: AssignSignatoryProps) {\n useI18n('Company.AssignSignatory')\n useComponentDictionary('Company.AssignSignatory', dictionary)\n\n const { onEvent } = useBase()\n\n const formMethods = useForm<AssignSignatorySelectionInputs>({\n resolver: zodResolver(AssignSignatorySelectionSchema),\n defaultValues: {\n signatoryAssignmentMode: SignatoryAssignmentMode.createSignatory,\n },\n })\n\n const onSignatoryAssignmentModeChange = (mode: string) => {\n onEvent(companyEvents.COMPANY_ASSIGN_SIGNATORY_MODE_UPDATED, mode)\n }\n\n const onSignatoryFormEvent: BaseComponentInterface['onEvent'] = (event, data) => {\n if (event === companyEvents.COMPANY_CREATE_SIGNATORY_DONE) {\n onEvent(companyEvents.COMPANY_ASSIGN_SIGNATORY_DONE)\n } else if (event === companyEvents.COMPANY_INVITE_SIGNATORY_DONE) {\n onEvent(companyEvents.COMPANY_ASSIGN_SIGNATORY_DONE)\n } else {\n onEvent(event, data)\n }\n }\n\n return (\n <section className={className}>\n <AssignSignatoryProvider\n value={{\n companyId,\n signatoryId,\n defaultValues,\n onSignatoryAssignmentModeChange,\n onSignatoryFormEvent,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n <FormProvider {...formMethods}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <AssignSignatorySelection />\n <SignatoryForm />\n </>\n )}\n </FormProvider>\n </Flex>\n </AssignSignatoryProvider>\n </section>\n )\n}\n"],"names":["AssignSignatory","props","jsx","BaseComponent","Root","AssignSignatorySelectionSchema","z","SignatoryAssignmentMode","companyId","signatoryId","defaultValues","className","children","dictionary","useI18n","useComponentDictionary","onEvent","useBase","formMethods","useForm","zodResolver","AssignSignatoryProvider","mode","companyEvents","event","data","Flex","FormProvider","jsxs","Fragment","Head","AssignSignatorySelection","SignatoryForm"],"mappings":";;;;;;;;;;;;;;;;;AAmBO,SAASA,EAAgBC,GAA6B;AAC3D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMI,IAAiCC,EAAE,OAAO;AAAA,EAC9C,yBAAyBA,EAAE,MAAM;AAAA,IAC/BA,EAAE,QAAQC,EAAwB,eAAe;AAAA,IACjDD,EAAE,QAAQC,EAAwB,eAAe;AAAA,EAAA,CAClD;AACH,CAAC;AAID,SAASH,EAAK;AAAA,EACZ,WAAAI;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,GAAyB;AACvB,EAAAC,EAAQ,yBAAyB,GACjCC,EAAuB,2BAA2BF,CAAU;AAE5D,QAAM,EAAE,SAAAG,EAAA,IAAYC,EAAA,GAEdC,IAAcC,EAAwC;AAAA,IAC1D,UAAUC,EAAYf,CAA8B;AAAA,IACpD,eAAe;AAAA,MACb,yBAAyBE,EAAwB;AAAA,IAAA;AAAA,EACnD,CACD;AAgBD,SACE,gBAAAL,EAAC,aAAQ,WAAAS,GACP,UAAA,gBAAAT;AAAA,IAACmB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAb;AAAA,QACA,aAAAC;AAAA,QACA,eAAAC;AAAA,QACA,iCArBgC,CAACY,MAAiB;AACxD,UAAAN,EAAQO,EAAc,uCAAuCD,CAAI;AAAA,QACnE;AAAA,QAoBQ,sBAlBwD,CAACE,GAAOC,MAAS;AAC/E,UAAID,MAAUD,EAAc,gCAC1BP,EAAQO,EAAc,6BAA6B,IAC1CC,MAAUD,EAAc,gCACjCP,EAAQO,EAAc,6BAA6B,IAEnDP,EAAQQ,GAAOC,CAAI;AAAA,QAEvB;AAAA,MAUQ;AAAA,MAGF,UAAA,gBAAAvB,EAACwB,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAxB,EAACyB,GAAA,EAAc,GAAGT,GACf,UAAAN,KAGC,gBAAAgB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAyB;AAAA,0BACzBC,GAAA,CAAA,CAAc;AAAA,MAAA,EAAA,CACjB,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}