@gusto/embedded-react-sdk 0.22.0 → 0.23.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/assets/icons/eye.svg.js +10 -0
  3. package/dist/assets/icons/eye.svg.js.map +1 -0
  4. package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
  5. package/dist/components/Common/ReorderableList/ReorderableItem.d.ts +1 -1
  6. package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
  7. package/dist/components/Common/ReorderableList/ReorderableList.js +7 -7
  8. package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
  9. package/dist/components/Common/SignatureForm/SignatureForm.js +12 -11
  10. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  11. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureFormFields.js +2 -2
  13. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  14. package/dist/components/Common/UI/Button/ButtonIcon.d.ts +1 -1
  15. package/dist/components/Common/UI/Button/ButtonIcon.js +10 -7
  16. package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
  17. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  18. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +5 -5
  19. package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
  20. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  27. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  28. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  29. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  30. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  31. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +6 -5
  32. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  33. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  34. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  35. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -5
  36. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  37. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
  38. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  39. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  40. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
  41. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  42. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  43. package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
  44. package/dist/components/Company/FederalTaxes/Form.js +4 -3
  45. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  46. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -8
  47. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  48. package/dist/components/Company/Industry/Context.js +7 -6
  49. package/dist/components/Company/Industry/Context.js.map +1 -1
  50. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  51. package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
  52. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  53. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  54. package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -2
  55. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  56. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  57. package/dist/components/Company/OnboardingOverview/Completed.js +3 -2
  58. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  59. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +3 -2
  60. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  61. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
  62. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  63. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  64. package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
  65. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  66. package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
  67. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  68. package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
  69. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  70. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  71. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  72. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  73. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  74. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  75. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  76. package/dist/components/Company/index.d.ts +2 -0
  77. package/dist/components/Company/index.js +20 -16
  78. package/dist/components/Company/index.js.map +1 -1
  79. package/dist/components/Contractor/Address/Address.js +2 -2
  80. package/dist/components/Contractor/Address/Form.js +1 -1
  81. package/dist/components/Contractor/Address/useAddress.js +6 -5
  82. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  83. package/dist/components/Contractor/ContractorList/index.js +17 -17
  84. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
  85. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  86. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +1 -1
  87. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +198 -42
  88. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  89. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +15 -8
  90. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +94 -63
  91. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  92. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.d.ts +39 -0
  93. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +132 -0
  94. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -0
  95. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +11 -0
  96. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +139 -0
  97. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -0
  98. package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +2 -0
  99. package/dist/components/Contractor/Payments/CreatePayment/helpers.js +6 -0
  100. package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -0
  101. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +3 -2
  102. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +21 -20
  103. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  104. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -2
  105. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +48 -84
  106. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  107. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +8 -0
  108. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +26 -0
  109. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -0
  110. package/dist/components/Contractor/Payments/{Detail/DetailPresentation.d.ts → PaymentHistory/PaymentHistoryPresentation.d.ts} +5 -4
  111. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +114 -0
  112. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -0
  113. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +3 -1
  114. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +43 -23
  115. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  116. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +8 -14
  117. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +73 -65
  118. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  119. package/dist/components/Contractor/Payments/types.d.ts +8 -0
  120. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  121. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  122. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  123. package/dist/components/Contractor/Submit/Submit.js +1 -1
  124. package/dist/components/Employee/Compensation/Edit.js +14 -14
  125. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +11 -10
  126. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  127. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -3
  128. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +63 -76
  129. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  130. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +12 -11
  131. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  132. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
  133. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
  134. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
  135. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  136. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  137. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  138. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
  139. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  140. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  141. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  142. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  143. package/dist/components/Employee/EmployeeList/Head.js +3 -2
  144. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  145. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  146. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  147. package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
  148. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  149. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  150. package/dist/components/Employee/Landing/Landing.js +8 -8
  151. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  152. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
  153. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +25 -23
  154. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  155. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +116 -106
  156. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
  157. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  158. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  159. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  160. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  161. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  162. package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
  163. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  164. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  165. package/dist/components/Employee/Profile/useProfile.js +4 -3
  166. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  167. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  168. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  169. package/dist/components/Employee/Taxes/FederalForm.js +7 -7
  170. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  171. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  172. package/dist/components/Flow/Flow.d.ts +3 -3
  173. package/dist/components/Flow/Flow.js +32 -27
  174. package/dist/components/Flow/Flow.js.map +1 -1
  175. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  176. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
  177. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -6
  178. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  179. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +3 -2
  180. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  181. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +27 -27
  182. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
  183. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  184. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +87 -72
  185. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  186. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +18 -17
  187. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  188. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +17 -16
  189. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  190. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +35 -35
  191. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  192. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/{FastAchThresholdExceeded.d.ts → FastAchSubmissionBlockerBanner.d.ts} +2 -2
  193. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +55 -0
  194. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -0
  195. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/index.d.ts +1 -1
  196. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  197. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  198. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +1 -1
  199. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
  200. package/dist/components/Payroll/index.d.ts +1 -1
  201. package/dist/components/Payroll/index.js +8 -6
  202. package/dist/components/Payroll/index.js.map +1 -1
  203. package/dist/components/Payroll/usePreparedPayrollData.js +6 -5
  204. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  205. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +4 -1
  206. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +9 -10
  207. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  208. package/dist/contexts/LocaleProvider/useLocale.d.ts +6 -3
  209. package/dist/contexts/LocaleProvider/useLocale.js +12 -9
  210. package/dist/contexts/LocaleProvider/useLocale.js.map +1 -1
  211. package/dist/helpers/currencyHelpers.d.ts +2 -0
  212. package/dist/helpers/currencyHelpers.js +6 -0
  213. package/dist/helpers/currencyHelpers.js.map +1 -0
  214. package/dist/i18n/I18n.js +3 -3
  215. package/dist/i18n/I18n.js.map +1 -1
  216. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +27 -21
  217. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  218. package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +24 -0
  219. package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js.map +1 -0
  220. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +30 -28
  221. package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js.map +1 -1
  222. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
  223. package/dist/i18n/en/Payroll.PayrollList.json.js +5 -5
  224. package/dist/i18n/en/Payroll.PayrollOverview.json.js +14 -14
  225. package/dist/shared/constants.d.ts +8 -2
  226. package/dist/shared/constants.js +18 -12
  227. package/dist/shared/constants.js.map +1 -1
  228. package/dist/style.css +1 -1
  229. package/dist/types/i18next.d.ts +57 -46
  230. package/package.json +11 -11
  231. package/dist/components/Contractor/Payments/EditPayment/EditPayment.d.ts +0 -7
  232. package/dist/components/Contractor/Payments/EditPayment/EditPayment.js +0 -34
  233. package/dist/components/Contractor/Payments/EditPayment/EditPayment.js.map +0 -1
  234. package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.d.ts +0 -6
  235. package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js +0 -84
  236. package/dist/components/Contractor/Payments/EditPayment/EditPaymentPresentation.js.map +0 -1
  237. package/dist/components/Contractor/Payments/Overview/Overview.d.ts +0 -7
  238. package/dist/components/Contractor/Payments/Overview/Overview.js +0 -72
  239. package/dist/components/Contractor/Payments/Overview/Overview.js.map +0 -1
  240. package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +0 -18
  241. package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js +0 -131
  242. package/dist/components/Contractor/Payments/Overview/OverviewPresentation.js.map +0 -1
  243. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +0 -51
  244. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +0 -1
  245. package/dist/i18n/en/Contractor.Payments.EditPayment.json.js +0 -36
  246. package/dist/i18n/en/Contractor.Payments.EditPayment.json.js.map +0 -1
  247. package/dist/i18n/en/Contractor.Payments.Overview.json.js +0 -34
  248. package/dist/i18n/en/Contractor.Payments.Overview.json.js.map +0 -1
  249. package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +0 -24
  250. package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.23.0
4
+
5
+ ### Features & Enhancements
6
+
7
+ - Add support for all garnishment types
8
+ - Update to include earned fast ach in submission blockers
9
+ - Add contractor payment progress and functionality
10
+
11
+ ### Fixes
12
+
13
+ - Restore defaults to icon button
14
+ - Updated copy on payroll overview
15
+ - Updated payrollHistory to display complete instead of paid
16
+ - Prevent multiple progress saved alerts on payroll overview
17
+ - Updated the payroll state machine to get the payroll dates
18
+ - Updated icons in payroll history action menu
19
+
20
+ ### Chores & Maintenance
21
+
22
+ - Fix tree shaking and add pagination to adapter docs
23
+ - Export signatory components and add docs
24
+ - Add docs for confirm wire details and export payroll blockers
25
+ - Remove ability for custom deduction to be court-ordered
26
+ - Bump react-aria-components from 1.13.0 to 1.14.0
27
+ - Bump typescript-eslint from 8.49.0 to 8.50.0
28
+ - Bump @gusto/embedded-api from 0.11.3 to 0.11.4
29
+ - Bump i18next from 25.7.2 to 25.7.3
30
+ - Bump react-i18next from 16.4.0 to 16.5.0
31
+ - Bump eslint from 9.39.1 to 9.39.2
32
+ - Bump sass-embedded from 1.93.3 to 1.96.0
33
+
3
34
  ## 0.22.0
4
35
 
5
36
  ### Features & Enhancements
@@ -0,0 +1,10 @@
1
+ import * as e from "react";
2
+ const n = ({
3
+ title: t,
4
+ titleId: r,
5
+ ...o
6
+ }) => /* @__PURE__ */ e.createElement("svg", { width: 19, height: 14, viewBox: "0 0 19 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": r, ...o }, t ? /* @__PURE__ */ e.createElement("title", { id: r }, t) : null, /* @__PURE__ */ e.createElement("path", { d: "M1.05315 7.26098C0.939657 7.08128 0.882912 6.99143 0.851147 6.85284C0.827287 6.74874 0.827287 6.58458 0.851147 6.48048C0.882912 6.3419 0.939657 6.25205 1.05315 6.07235C1.99098 4.58736 4.78254 0.833328 9.03671 0.833328C13.2909 0.833328 16.0824 4.58736 17.0203 6.07235C17.1338 6.25205 17.1905 6.3419 17.2223 6.48048C17.2461 6.58458 17.2461 6.74874 17.2223 6.85284C17.1905 6.99143 17.1338 7.08128 17.0203 7.26098C16.0824 8.74596 13.2909 12.5 9.03671 12.5C4.78254 12.5 1.99098 8.74596 1.05315 7.26098Z", stroke: "currentColor", strokeWidth: 1.66667, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M9.03671 9.16666C10.4174 9.16666 11.5367 8.04737 11.5367 6.66666C11.5367 5.28595 10.4174 4.16666 9.03671 4.16666C7.656 4.16666 6.53671 5.28595 6.53671 6.66666C6.53671 8.04737 7.656 9.16666 9.03671 9.16666Z", stroke: "currentColor", strokeWidth: 1.66667, strokeLinecap: "round", strokeLinejoin: "round" }));
7
+ export {
8
+ n as default
9
+ };
10
+ //# sourceMappingURL=eye.svg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eye.svg.js","sources":["../../../src/assets/icons/eye.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgEye = ({\n title,\n titleId,\n ...props\n}) => /* @__PURE__ */ React.createElement(\"svg\", { width: 19, height: 14, viewBox: \"0 0 19 14\", 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(\"path\", { d: \"M1.05315 7.26098C0.939657 7.08128 0.882912 6.99143 0.851147 6.85284C0.827287 6.74874 0.827287 6.58458 0.851147 6.48048C0.882912 6.3419 0.939657 6.25205 1.05315 6.07235C1.99098 4.58736 4.78254 0.833328 9.03671 0.833328C13.2909 0.833328 16.0824 4.58736 17.0203 6.07235C17.1338 6.25205 17.1905 6.3419 17.2223 6.48048C17.2461 6.58458 17.2461 6.74874 17.2223 6.85284C17.1905 6.99143 17.1338 7.08128 17.0203 7.26098C16.0824 8.74596 13.2909 12.5 9.03671 12.5C4.78254 12.5 1.99098 8.74596 1.05315 7.26098Z\", stroke: \"currentColor\", strokeWidth: 1.66667, strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M9.03671 9.16666C10.4174 9.16666 11.5367 8.04737 11.5367 6.66666C11.5367 5.28595 10.4174 4.16666 9.03671 4.16666C7.656 4.16666 6.53671 5.28595 6.53671 6.66666C6.53671 8.04737 7.656 9.16666 9.03671 9.16666Z\", stroke: \"currentColor\", strokeWidth: 1.66667, strokeLinecap: \"round\", strokeLinejoin: \"round\" }));\nexport default SvgEye;\n"],"names":["SvgEye","title","titleId","props","React"],"mappings":";AACK,MAACA,IAAS,CAAC;AAAA,EACd,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,QAAQ,EAAE,GAAG,qfAAqf,QAAQ,gBAAgB,aAAa,SAAS,eAAe,SAAS,gBAAgB,QAAO,CAAE,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,iNAAiN,QAAQ,gBAAgB,aAAa,SAAS,eAAe,SAAS,gBAAgB,QAAO,CAAE,CAAC;"}
@@ -7,6 +7,6 @@ export type PaginationControlProps = {
7
7
  handleItemsPerPageChange: (n: PaginationItemsPerPage) => void;
8
8
  currentPage: number;
9
9
  totalPages: number;
10
- itemsPerPage: PaginationItemsPerPage;
10
+ itemsPerPage?: PaginationItemsPerPage;
11
11
  isFetching?: boolean;
12
12
  };
@@ -3,7 +3,7 @@ import { ReorderableListItem } from './ReorderableListTypes';
3
3
  interface ReorderableItemProps {
4
4
  item: ReorderableListItem;
5
5
  index: number;
6
- moveItem: (fromIndex: number, toIndex: number, source?: 'keyboard' | 'dragdrop') => void;
6
+ moveItem: (fromIndex: number, toIndex: number, source: 'keyboard' | 'dragdrop') => void;
7
7
  itemCount: number;
8
8
  itemIndex: number;
9
9
  listId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ReorderableItem.js","sources":["../../../../src/components/Common/ReorderableList/ReorderableItem.tsx"],"sourcesContent":["import { useRef, useEffect, useCallback, memo } from 'react'\nimport classnames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useDrag } from 'react-dnd'\nimport type { ReactElement } from 'react'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport type { ReorderableListItem } from './ReorderableListTypes'\nimport styles from './ReorderableList.module.scss'\nimport { ITEM_TYPE } from './constants'\nimport ListIcon from '@/assets/icons/list.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ReorderableItemProps {\n item: ReorderableListItem\n index: number\n moveItem: (fromIndex: number, toIndex: number, source?: 'keyboard' | 'dragdrop') => void\n itemCount: number\n itemIndex: number\n listId: string\n isDraggingAny: boolean\n setIsDragging: (isDragging: boolean) => void\n isReorderingActive: boolean\n setIsReorderingActive: (isReorderingActive: boolean) => void\n isCurrentlyReordering: boolean\n setReorderingItemIndex: (reorderingItemIndex: number | null) => void\n renderDragHandle?: (props: {\n id: string | number\n label: string\n isReordering: boolean\n isDragging: boolean\n }) => ReactElement\n className?: string\n}\n\n/**\n * Component for an individual reorderable item\n */\nexport const ReorderableItem = memo(function ReorderableItem({\n item,\n index,\n moveItem,\n itemCount,\n itemIndex,\n listId,\n isDraggingAny,\n setIsDragging,\n isReorderingActive,\n setIsReorderingActive,\n isCurrentlyReordering,\n setReorderingItemIndex,\n renderDragHandle,\n className,\n}: ReorderableItemProps) {\n const ref = useRef<HTMLDivElement>(null)\n const buttonRef = useRef<HTMLButtonElement>(null)\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n // Format the accessible item name\n const accessibleItemName = item.label\n\n // Add a ref to track if this specific item is being dragged\n const isBeingDraggedRef = useRef(false)\n\n // When this item becomes the reordering item, focus on it\n useEffect(() => {\n if (isCurrentlyReordering && buttonRef.current) {\n buttonRef.current.focus()\n }\n }, [isCurrentlyReordering])\n\n // React DnD - Drag source\n const [{ isDragging }, drag, dragPreview] = useDrag(\n () => ({\n type: ITEM_TYPE,\n item: () => {\n isBeingDraggedRef.current = true\n setIsDragging(true)\n return { index, listId }\n },\n collect: monitor => ({\n isDragging: monitor.isDragging(),\n }),\n end: () => {\n isBeingDraggedRef.current = false\n\n setIsDragging(false)\n\n if (buttonRef.current) {\n buttonRef.current.blur()\n }\n },\n canDrag: () => !isDraggingAny || isBeingDraggedRef.current,\n }),\n [index, listId, setIsDragging, isDraggingAny],\n )\n\n /**\n * Handles keyboard interactions for reordering\n */\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n let newReorderingState: boolean\n\n switch (e.key) {\n case 'ArrowUp':\n if (isReorderingActive && index > 0) {\n e.preventDefault()\n setReorderingItemIndex(index)\n moveItem(index, index - 1, 'keyboard')\n }\n break\n case 'ArrowDown':\n if (isReorderingActive && index < itemCount - 1) {\n e.preventDefault()\n setReorderingItemIndex(index)\n moveItem(index, index + 1, 'keyboard')\n }\n break\n case 'Escape':\n if (isReorderingActive) {\n e.preventDefault()\n setIsReorderingActive(false)\n setReorderingItemIndex(null)\n }\n break\n case 'Tab':\n if (isReorderingActive) {\n setIsReorderingActive(false)\n setReorderingItemIndex(null)\n }\n break\n case ' ':\n case 'Enter':\n e.preventDefault()\n newReorderingState = !isReorderingActive\n setIsReorderingActive(newReorderingState)\n\n if (newReorderingState) {\n setReorderingItemIndex(index)\n } else {\n setReorderingItemIndex(null)\n }\n break\n default:\n break\n }\n },\n [isReorderingActive, index, itemCount, setReorderingItemIndex, moveItem, setIsReorderingActive],\n )\n\n // Set up drag preview and drag source\n useEffect(() => {\n if (ref.current) {\n dragPreview(ref.current)\n }\n }, [dragPreview])\n\n const itemClasses = classnames(\n styles.reorderableItem,\n isDragging ? styles.dragging : '',\n isReorderingActive ? styles.reordering : '',\n className,\n )\n\n return (\n <div\n ref={ref}\n role=\"listitem\"\n aria-posinset={index + 1}\n aria-setsize={itemCount}\n className={itemClasses}\n data-position={index}\n data-item-index={itemIndex}\n data-list-id={listId}\n data-testid={`reorderable-item-${index}`}\n data-dragging={isDragging ? 'true' : 'false'}\n data-reordering={isReorderingActive ? 'true' : 'false'}\n >\n <VisuallyHidden>\n {t('reorderableList.draggablePosition', {\n item: accessibleItemName,\n position: String(index + 1),\n total: String(itemCount),\n })}\n </VisuallyHidden>\n <span className={styles.dragHandle}>\n {renderDragHandle ? (\n renderDragHandle({\n id: item.id || index,\n label: accessibleItemName,\n isReordering: isReorderingActive,\n isDragging: isDragging,\n })\n ) : (\n <Components.ButtonIcon\n data-index={index}\n data-item-index={itemIndex}\n data-reordering={isReorderingActive ? 'true' : 'false'}\n data-focus-visible={true}\n data-testid=\"drag-handle-button\"\n tabIndex={0}\n onFocus={e => {\n e.currentTarget.setAttribute('data-focus-visible', 'true')\n }}\n onBlur={e => {\n e.currentTarget.removeAttribute('data-focus-visible')\n }}\n aria-label={\n isReorderingActive\n ? t('reorderableList.draggableLabelActive', {\n item: accessibleItemName,\n })\n : t('reorderableList.draggableLabel', {\n item: accessibleItemName,\n })\n }\n aria-roledescription={t('reorderableList.draggableItem')}\n aria-grabbed={isDragging}\n onKeyDown={handleKeyDown}\n buttonRef={node => {\n if (node) {\n buttonRef.current = node\n drag(node)\n }\n }}\n >\n <ListIcon />\n </Components.ButtonIcon>\n )}\n </span>\n <div className={styles.contentContainer}>{item.content}</div>\n </div>\n )\n})\n"],"names":["ReorderableItem","memo","item","index","moveItem","itemCount","itemIndex","listId","isDraggingAny","setIsDragging","isReorderingActive","setIsReorderingActive","isCurrentlyReordering","setReorderingItemIndex","renderDragHandle","className","ref","useRef","buttonRef","t","useTranslation","Components","useComponentContext","accessibleItemName","isBeingDraggedRef","useEffect","isDragging","drag","dragPreview","useDrag","ITEM_TYPE","monitor","handleKeyDown","useCallback","e","newReorderingState","itemClasses","classnames","styles","jsxs","jsx","VisuallyHidden","node","ListIcon"],"mappings":";;;;;;;;;;AAqCO,MAAMA,IAAkBC,EAAK,SAAyB;AAAA,EAC3D,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,WAAAC;AACF,GAAyB;AACvB,QAAMC,IAAMC,EAAuB,IAAI,GACjCC,IAAYD,EAA0B,IAAI,GAC1C,EAAE,GAAAE,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA,GAGbC,IAAqBrB,EAAK,OAG1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AqB,SAAS;AAAA,YAC/C,sBAAoB;AAAA,YACpB,eAAY;AAAA,YACZ,UAAU;AAAA,YACV,SAAS,CAAAwB,MAAK;AACZ,cAAAA,EAAE,cAAc,aAAa,sBAAsB,MAAM;AAAA,YAC3D;AAAA,YACA,QAAQ,CAAAA,MAAK;AACX,cAAAA,EAAE,cAAc,gBAAgB,oBAAoB;AAAA,YACtD;AAAA,YACA,cACExB,IACIS,EAAE,wCAAwC;AAAA,cACxC,MAAMI;AAAA,YAAA,CACP,IACDJ,EAAE,kCAAkC;AAAA,cAClC,MAAMI;AAAA,YAAA,CACP;AAAA,YAEP,wBAAsBJ,EAAE,+BAA+B;AAAA,YACvD,gBAAcO;AAAA,YACd,WAAWM;AAAA,YACX,WAAW,CAAAU,MAAQ;AACjB,cAAIA,MACFxB,EAAU,UAAUwB,GACpBf,EAAKe,CAAI;AAAA,YAEb;AAAA,YAEA,4BAACC,GAAA,CAAA,CAAS;AAAA,UAAA;AAAA,QAAA,GAGhB;AAAA,0BACC,OAAA,EAAI,WAAWL,EAAO,kBAAmB,YAAK,QAAA,CAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG7D,CAAC;"}
1
+ {"version":3,"file":"ReorderableItem.js","sources":["../../../../src/components/Common/ReorderableList/ReorderableItem.tsx"],"sourcesContent":["import { useRef, useEffect, useCallback, memo } from 'react'\nimport classnames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useDrag } from 'react-dnd'\nimport type { ReactElement } from 'react'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport type { ReorderableListItem } from './ReorderableListTypes'\nimport styles from './ReorderableList.module.scss'\nimport { ITEM_TYPE } from './constants'\nimport ListIcon from '@/assets/icons/list.svg?react'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ReorderableItemProps {\n item: ReorderableListItem\n index: number\n moveItem: (fromIndex: number, toIndex: number, source: 'keyboard' | 'dragdrop') => void\n itemCount: number\n itemIndex: number\n listId: string\n isDraggingAny: boolean\n setIsDragging: (isDragging: boolean) => void\n isReorderingActive: boolean\n setIsReorderingActive: (isReorderingActive: boolean) => void\n isCurrentlyReordering: boolean\n setReorderingItemIndex: (reorderingItemIndex: number | null) => void\n renderDragHandle?: (props: {\n id: string | number\n label: string\n isReordering: boolean\n isDragging: boolean\n }) => ReactElement\n className?: string\n}\n\n/**\n * Component for an individual reorderable item\n */\nexport const ReorderableItem = memo(function ReorderableItem({\n item,\n index,\n moveItem,\n itemCount,\n itemIndex,\n listId,\n isDraggingAny,\n setIsDragging,\n isReorderingActive,\n setIsReorderingActive,\n isCurrentlyReordering,\n setReorderingItemIndex,\n renderDragHandle,\n className,\n}: ReorderableItemProps) {\n const ref = useRef<HTMLDivElement>(null)\n const buttonRef = useRef<HTMLButtonElement>(null)\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n // Format the accessible item name\n const accessibleItemName = item.label\n\n // Add a ref to track if this specific item is being dragged\n const isBeingDraggedRef = useRef(false)\n\n // When this item becomes the reordering item, focus on it\n useEffect(() => {\n if (isCurrentlyReordering && buttonRef.current) {\n buttonRef.current.focus()\n }\n }, [isCurrentlyReordering])\n\n // React DnD - Drag source\n const [{ isDragging }, drag, dragPreview] = useDrag(\n () => ({\n type: ITEM_TYPE,\n item: () => {\n isBeingDraggedRef.current = true\n setIsDragging(true)\n return { index, listId }\n },\n collect: monitor => ({\n isDragging: monitor.isDragging(),\n }),\n end: () => {\n isBeingDraggedRef.current = false\n\n setIsDragging(false)\n\n if (buttonRef.current) {\n buttonRef.current.blur()\n }\n },\n canDrag: () => !isDraggingAny || isBeingDraggedRef.current,\n }),\n [index, listId, setIsDragging, isDraggingAny],\n )\n\n /**\n * Handles keyboard interactions for reordering\n */\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n let newReorderingState: boolean\n\n switch (e.key) {\n case 'ArrowUp':\n if (isReorderingActive && index > 0) {\n e.preventDefault()\n setReorderingItemIndex(index)\n moveItem(index, index - 1, 'keyboard')\n }\n break\n case 'ArrowDown':\n if (isReorderingActive && index < itemCount - 1) {\n e.preventDefault()\n setReorderingItemIndex(index)\n moveItem(index, index + 1, 'keyboard')\n }\n break\n case 'Escape':\n if (isReorderingActive) {\n e.preventDefault()\n setIsReorderingActive(false)\n setReorderingItemIndex(null)\n }\n break\n case 'Tab':\n if (isReorderingActive) {\n setIsReorderingActive(false)\n setReorderingItemIndex(null)\n }\n break\n case ' ':\n case 'Enter':\n e.preventDefault()\n newReorderingState = !isReorderingActive\n setIsReorderingActive(newReorderingState)\n\n if (newReorderingState) {\n setReorderingItemIndex(index)\n } else {\n setReorderingItemIndex(null)\n }\n break\n default:\n break\n }\n },\n [isReorderingActive, index, itemCount, setReorderingItemIndex, moveItem, setIsReorderingActive],\n )\n\n // Set up drag preview and drag source\n useEffect(() => {\n if (ref.current) {\n dragPreview(ref.current)\n }\n }, [dragPreview])\n\n const itemClasses = classnames(\n styles.reorderableItem,\n isDragging ? styles.dragging : '',\n isReorderingActive ? styles.reordering : '',\n className,\n )\n\n return (\n <div\n ref={ref}\n role=\"listitem\"\n aria-posinset={index + 1}\n aria-setsize={itemCount}\n className={itemClasses}\n data-position={index}\n data-item-index={itemIndex}\n data-list-id={listId}\n data-testid={`reorderable-item-${index}`}\n data-dragging={isDragging ? 'true' : 'false'}\n data-reordering={isReorderingActive ? 'true' : 'false'}\n >\n <VisuallyHidden>\n {t('reorderableList.draggablePosition', {\n item: accessibleItemName,\n position: String(index + 1),\n total: String(itemCount),\n })}\n </VisuallyHidden>\n <span className={styles.dragHandle}>\n {renderDragHandle ? (\n renderDragHandle({\n id: item.id || index,\n label: accessibleItemName,\n isReordering: isReorderingActive,\n isDragging: isDragging,\n })\n ) : (\n <Components.ButtonIcon\n data-index={index}\n data-item-index={itemIndex}\n data-reordering={isReorderingActive ? 'true' : 'false'}\n data-focus-visible={true}\n data-testid=\"drag-handle-button\"\n tabIndex={0}\n onFocus={e => {\n e.currentTarget.setAttribute('data-focus-visible', 'true')\n }}\n onBlur={e => {\n e.currentTarget.removeAttribute('data-focus-visible')\n }}\n aria-label={\n isReorderingActive\n ? t('reorderableList.draggableLabelActive', {\n item: accessibleItemName,\n })\n : t('reorderableList.draggableLabel', {\n item: accessibleItemName,\n })\n }\n aria-roledescription={t('reorderableList.draggableItem')}\n aria-grabbed={isDragging}\n onKeyDown={handleKeyDown}\n buttonRef={node => {\n if (node) {\n buttonRef.current = node\n drag(node)\n }\n }}\n >\n <ListIcon />\n </Components.ButtonIcon>\n )}\n </span>\n <div className={styles.contentContainer}>{item.content}</div>\n </div>\n )\n})\n"],"names":["ReorderableItem","memo","item","index","moveItem","itemCount","itemIndex","listId","isDraggingAny","setIsDragging","isReorderingActive","setIsReorderingActive","isCurrentlyReordering","setReorderingItemIndex","renderDragHandle","className","ref","useRef","buttonRef","t","useTranslation","Components","useComponentContext","accessibleItemName","isBeingDraggedRef","useEffect","isDragging","drag","dragPreview","useDrag","ITEM_TYPE","monitor","handleKeyDown","useCallback","e","newReorderingState","itemClasses","classnames","styles","jsxs","jsx","VisuallyHidden","node","ListIcon"],"mappings":";;;;;;;;;;AAqCO,MAAMA,IAAkBC,EAAK,SAAyB;AAAA,EAC3D,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,WAAAC;AACF,GAAyB;AACvB,QAAMC,IAAMC,EAAuB,IAAI,GACjCC,IAAYD,EAA0B,IAAI,GAC1C,EAAE,GAAAE,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA,GAGbC,IAAqBrB,EAAK,OAG1BsB,IAAoBP,EAAO,EAAK;AAGtC,EAAAQ,EAAU,MAAM;AACd,IAAIb,KAA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AAAA,YACV,SAAS,CAAAwB,MAAK;AACZ,cAAAA,EAAE,cAAc,aAAa,sBAAsB,MAAM;AAAA,YAC3D;AAAA,YACA,QAAQ,CAAAA,MAAK;AACX,cAAAA,EAAE,cAAc,gBAAgB,oBAAoB;AAAA,YACtD;AAAA,YACA,cACExB,IACIS,EAAE,wCAAwC;AAAA,cACxC,MAAMI;AAAA,YAAA,CACP,IACDJ,EAAE,kCAAkC;AAAA,cAClC,MAAMI;AAAA,YAAA,CACP;AAAA,YAEP,wBAAsBJ,EAAE,+BAA+B;AAAA,YACvD,gBAAcO;AAAA,YACd,WAAWM;AAAA,YACX,WAAW,CAAAU,MAAQ;AACjB,cAAIA,MACFxB,EAAU,UAAUwB,GACpBf,EAAKe,CAAI;AAAA,YAEb;AAAA,YAEA,4BAACC,GAAA,CAAA,CAAS;AAAA,UAAA;AAAA,QAAA,GAGhB;AAAA,0BACC,OAAA,EAAI,WAAWL,EAAO,kBAAmB,YAAK,QAAA,CAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG7D,CAAC;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as M } from "react/jsx-runtime";
2
- import { useRef as $, useState as p, useMemo as U, useEffect as G, useCallback as R } from "react";
2
+ import { useRef as $, useState as b, useMemo as U, useEffect as G, useCallback as R } from "react";
3
3
  import T from "classnames";
4
4
  import { HTML5Backend as z } from "../../../node_modules/react-dnd-html5-backend/dist/index.js";
5
5
  import g from "./ReorderableList.module.scss.js";
@@ -37,9 +37,9 @@ function ce({
37
37
  dropZoneClassName: y,
38
38
  itemClassName: L
39
39
  }) {
40
- const c = $(Q()).current, [i, Z] = p(
40
+ const c = $(Q()).current, [i, Z] = b(
41
41
  () => Array.from({ length: t.length }, (r, e) => e)
42
- ), [F, b] = p(null), [S, _] = p(!1), [j, B] = p(!1), [E, k] = p(null), A = $(!1), u = $({}), o = U(
42
+ ), [F, p] = b(null), [S, _] = b(!1), [j, B] = b(!1), [E, k] = b(null), A = $(!1), u = $({}), o = U(
43
43
  () => ({
44
44
  ...q,
45
45
  ...f
@@ -50,13 +50,13 @@ function ce({
50
50
  t.length !== i.length && Z(Array.from({ length: t.length }, (r, e) => e));
51
51
  }, [t.length, i.length]);
52
52
  const w = R((r) => {
53
- u.current = {}, u.current[r] = !0, b(r);
53
+ u.current = {}, u.current[r] = !0, p(r);
54
54
  }, []), x = R((r) => {
55
55
  r in u.current && (u.current[r] = !1);
56
56
  const e = Object.entries(u.current).filter(([l, m]) => m).map(([l]) => Number(l));
57
- e.length === 0 ? b(null) : e.length === 1 && b(Number(e[0]));
57
+ e.length === 0 ? p(null) : e.length === 1 && p(Number(e[0]));
58
58
  }, []), I = R(
59
- (r, e, l = "dragdrop") => {
59
+ (r, e, l) => {
60
60
  if (D || r === e || r < 0 || r >= i.length || e < 0 || e > i.length)
61
61
  return;
62
62
  A.current = !0;
@@ -68,7 +68,7 @@ function ce({
68
68
  Z(N);
69
69
  const H = o.disabled ? 0 : o.duration;
70
70
  setTimeout(() => {
71
- if (_(!1), A.current = !1, u.current = {}, b(null), l === "keyboard") {
71
+ if (_(!1), A.current = !1, u.current = {}, p(null), l === "keyboard") {
72
72
  const h = N.findIndex((v) => v === m);
73
73
  if (h >= 0) {
74
74
  k(h);
@@ -1 +1 @@
1
- {"version":3,"file":"ReorderableList.js","sources":["../../../../src/components/Common/ReorderableList/ReorderableList.tsx"],"sourcesContent":["import { useRef, useState, useEffect, useCallback, useMemo } from 'react'\nimport classnames from 'classnames'\nimport { DndProvider } from 'react-dnd'\nimport { HTML5Backend } from 'react-dnd-html5-backend'\nimport type { ReactElement } from 'react'\nimport type { ReorderableListItem } from './ReorderableListTypes'\nimport styles from './ReorderableList.module.scss'\nimport { ReorderableItem } from './ReorderableItem'\nimport { DropZone } from './DropZone'\n\n// Helper functions\nfunction generateUniqueListId(prefix = 'reorderable-list'): string {\n return `${prefix}-${Math.random().toString(36).slice(2, 9)}`\n}\n\nfunction reorderArray<T>(array: T[], from: number, to: number): T[] {\n if (from === to || from < 0 || from >= array.length || to < 0 || to > array.length) {\n return [...array]\n }\n\n const newArray = [...array]\n const [removed] = newArray.splice(from, 1)\n\n if (removed === undefined) {\n return [...array]\n }\n\n newArray.splice(to, 0, removed)\n return newArray\n}\n\nfunction calculateNewOrder(\n currentOrder: number[],\n fromPosition: number,\n toPosition: number,\n): number[] {\n if (\n fromPosition === toPosition ||\n fromPosition < 0 ||\n fromPosition >= currentOrder.length ||\n toPosition < 0 ||\n toPosition > currentOrder.length\n ) {\n return [...currentOrder]\n }\n\n return reorderArray(currentOrder, fromPosition, toPosition)\n}\n\nfunction adjustTargetPosition(\n fromPosition: number,\n toPosition: number,\n source: 'keyboard' | 'dragdrop' = 'dragdrop',\n): number {\n // When dragging, adjust the target position if moving an element forward\n if (source === 'dragdrop' && fromPosition < toPosition) {\n return toPosition - 1\n }\n return toPosition\n}\n\ninterface ReorderableListAnimationConfig {\n duration?: number\n easing?: string\n disabled?: boolean\n}\n\ninterface ReorderableListProps {\n items: ReorderableListItem[]\n label: string\n onReorder?: (itemOrder: number[]) => void\n className?: string\n animationConfig?: ReorderableListAnimationConfig\n disabled?: boolean\n renderDragHandle?: (props: {\n id: string | number\n label: string\n isReordering: boolean\n isDragging: boolean\n }) => ReactElement\n dropZoneClassName?: string\n itemClassName?: string\n}\n\n// Default animation config\nconst DEFAULT_ANIMATION_CONFIG: ReorderableListAnimationConfig = {\n duration: 200,\n easing: 'ease-in-out',\n disabled: false,\n}\n\nexport function ReorderableList({\n items,\n label,\n onReorder,\n className,\n animationConfig = DEFAULT_ANIMATION_CONFIG,\n disabled = false,\n renderDragHandle,\n dropZoneClassName,\n itemClassName,\n}: ReorderableListProps) {\n const listId = useRef(generateUniqueListId()).current\n\n const [itemOrder, setItemOrder] = useState<number[]>(() =>\n Array.from({ length: items.length }, (_, i) => i),\n )\n const [activeDropZone, setActiveDropZone] = useState<number | null>(null)\n const [isDragging, setIsDragging] = useState(false)\n const [isReorderingActive, setIsReorderingActive] = useState(false)\n const [reorderingItemIndex, setReorderingItemIndex] = useState<number | null>(null)\n const pendingReorderRef = useRef<boolean>(false)\n const activeDropZonesRef = useRef<Record<number, boolean>>({})\n\n const mergedAnimationConfig = useMemo(\n () => ({\n ...DEFAULT_ANIMATION_CONFIG,\n ...animationConfig,\n }),\n [animationConfig],\n )\n\n useEffect(() => {\n if (items.length !== itemOrder.length) {\n setItemOrder(Array.from({ length: items.length }, (_, i) => i))\n }\n }, [items.length, itemOrder.length])\n\n // Debounced state setter for drop zones to prevent flickering\n const activateDropZone = useCallback((position: number) => {\n activeDropZonesRef.current = {}\n activeDropZonesRef.current[position] = true\n setActiveDropZone(position)\n }, [])\n\n const deactivateDropZone = useCallback((position: number) => {\n if (position in activeDropZonesRef.current) {\n activeDropZonesRef.current[position] = false\n }\n\n const activeDropZones = Object.entries(activeDropZonesRef.current)\n .filter(([_, isActive]) => isActive)\n .map(([pos]) => Number(pos))\n\n if (activeDropZones.length === 0) {\n setActiveDropZone(null)\n } else if (activeDropZones.length === 1) {\n setActiveDropZone(Number(activeDropZones[0]))\n }\n }, [])\n\n const moveItem = useCallback(\n (fromPosition: number, toPosition: number, source: 'keyboard' | 'dragdrop' = 'dragdrop') => {\n if (\n disabled ||\n fromPosition === toPosition ||\n fromPosition < 0 ||\n fromPosition >= itemOrder.length ||\n toPosition < 0 ||\n toPosition > itemOrder.length\n ) {\n return\n }\n\n pendingReorderRef.current = true\n const movedItemIndex = itemOrder[fromPosition]\n\n // Use utility function to calculate new order\n const newOrder = calculateNewOrder(\n itemOrder,\n fromPosition,\n adjustTargetPosition(fromPosition, toPosition, source),\n )\n\n setItemOrder(newOrder)\n\n // Use the configured animation duration\n const animationDuration = mergedAnimationConfig.disabled ? 0 : mergedAnimationConfig.duration\n\n setTimeout(() => {\n setIsDragging(false)\n pendingReorderRef.current = false\n activeDropZonesRef.current = {}\n setActiveDropZone(null)\n\n if (source === 'keyboard') {\n const newPosition = newOrder.findIndex(idx => idx === movedItemIndex)\n\n if (newPosition >= 0) {\n setReorderingItemIndex(newPosition)\n const dragButtons = document.querySelectorAll(\n `[data-list-id=\"${listId}\"] .${styles.dragHandle} button`,\n )\n\n if (newPosition < dragButtons.length) {\n // Use requestAnimationFrame for smoother focus handling\n requestAnimationFrame(() => {\n if (dragButtons[newPosition]) {\n const buttonToFocus = dragButtons[newPosition] as HTMLElement\n buttonToFocus.focus()\n }\n })\n }\n }\n }\n\n if (onReorder) {\n onReorder(newOrder)\n }\n }, animationDuration)\n },\n [itemOrder, listId, onReorder, disabled, mergedAnimationConfig],\n )\n\n // If the list is disabled, don't render the DnD functionality\n if (disabled) {\n return (\n <div\n role=\"list\"\n aria-label={label}\n className={classnames(styles.reorderableList, className, styles.disabled)}\n data-list-id={listId}\n data-testid=\"reorderable-list\"\n >\n {itemOrder.map(itemIndex => {\n const item = items[itemIndex]\n if (!item) return null\n\n return (\n <div\n key={`item-static-${item.id || itemIndex}`}\n role=\"listitem\"\n className={classnames(styles.reorderableItem, itemClassName)}\n >\n <div className={styles.contentContainer}>{item.content}</div>\n </div>\n )\n })}\n </div>\n )\n }\n\n return (\n <DndProvider backend={HTML5Backend}>\n <div\n role=\"list\"\n aria-label={label}\n className={classnames(styles.reorderableList, className)}\n data-list-id={listId}\n data-testid=\"reorderable-list\"\n style={{\n ...(!mergedAnimationConfig.disabled &&\n ({\n '--animation-duration': `${mergedAnimationConfig.duration}ms`,\n '--animation-easing': mergedAnimationConfig.easing,\n } as React.CSSProperties)),\n }}\n >\n <DropZone\n position={0}\n listId={listId}\n isActive={activeDropZone === 0}\n onActivate={() => {\n activateDropZone(0)\n }}\n onDeactivate={() => {\n deactivateDropZone(0)\n }}\n onDrop={(fromPosition: number) => {\n if (!pendingReorderRef.current) {\n moveItem(fromPosition, 0, 'dragdrop')\n }\n }}\n className={dropZoneClassName}\n />\n\n {itemOrder.map((itemIndex, position) => {\n const item = items[itemIndex]\n if (!item) return null\n\n return (\n <div key={`item-container-${item.id || itemIndex}-${position}`}>\n <ReorderableItem\n key={`item-${item.id || itemIndex}`}\n item={item}\n index={position}\n moveItem={moveItem}\n itemCount={items.length}\n itemIndex={itemIndex}\n listId={listId}\n isDraggingAny={isDragging}\n setIsDragging={setIsDragging}\n isReorderingActive={isReorderingActive}\n setIsReorderingActive={setIsReorderingActive}\n isCurrentlyReordering={isReorderingActive && reorderingItemIndex === position}\n setReorderingItemIndex={setReorderingItemIndex}\n renderDragHandle={renderDragHandle}\n className={itemClassName}\n />\n\n <DropZone\n position={position + 1}\n listId={listId}\n isActive={activeDropZone === position + 1}\n onActivate={() => {\n activateDropZone(position + 1)\n }}\n onDeactivate={() => {\n deactivateDropZone(position + 1)\n }}\n onDrop={(fromPosition: number) => {\n if (!pendingReorderRef.current) {\n moveItem(fromPosition, position + 1, 'dragdrop')\n }\n }}\n className={dropZoneClassName}\n />\n </div>\n )\n })}\n </div>\n </DndProvider>\n )\n}\n"],"names":["generateUniqueListId","prefix","reorderArray","array","from","to","newArray","removed","calculateNewOrder","currentOrder","fromPosition","toPosition","adjustTargetPosition","source","DEFAULT_ANIMATION_CONFIG","ReorderableList","items","label","onReorder","className","animationConfig","disabled","renderDragHandle","dropZoneClassName","itemClassName","listId","useRef","itemOrder","setItemOrder","useState","_","i","activeDropZone","setActiveDropZone","isDragging","setIsDragging","isReorderingActive","setIsReorderingActive","reorderingItemIndex","setReorderingItemIndex","pendingReorderRef","activeDropZonesRef","mergedAnimationConfig","useMemo","useEffect","activateDropZone","useCallback","position","deactivateDropZone","activeDropZones","isActive","pos","moveItem","movedItemIndex","newOrder","animationDuration","newPosition","idx","dragButtons","styles","jsx","classnames","itemIndex","item","DndProvider","HTML5Backend","jsxs","DropZone","ReorderableItem"],"mappings":";;;;;;;;AAWA,SAASA,EAAqBC,IAAS,oBAA4B;AACjE,SAAO,GAAGA,CAAM,IAAI,KAAK,OAAA,EAAS,SAAS,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC;AAC5D;AAEA,SAASC,EAAgBC,GAAY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BACA,eAAeS;AAAA,gBACf,eAAAC;AAAA,gBACA,oBAAAC;AAAA,gBACA,uBAAAC;AAAA,gBACA,uBAAuBD,KAAsBE,MAAwBS;AAAA,gBACrE,wBAAAR;AAAA,gBACA,kBAAAjB;AAAA,gBACA,WAAWE;AAAA,cAAA;AAAA,cAdN,QAAQuC,EAAK,MAAMD,CAAS;AAAA,YAAA;AAAA,YAiBnC,gBAAAF;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,UAAUpB,IAAW;AAAA,gBACrB,QAAAtB;AAAA,gBACA,UAAUO,MAAmBe,IAAW;AAAA,gBACxC,YAAY,MAAM;AAChB,kBAAAF,EAAiBE,IAAW,CAAC;AAAA,gBAC/B;AAAA,gBACA,cAAc,MAAM;AAClB,kBAAAC,EAAmBD,IAAW,CAAC;AAAA,gBACjC;AAAA,gBACA,QAAQ,CAACrC,MAAyB;AAChC,kBAAK8B,EAAkB,WACrBY,EAAS1C,GAAcqC,IAAW,GAAG,UAAU;AAAA,gBAEnD;AAAA,gBACA,WAAWxB;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,KAnCQ,kBAAkBwC,EAAK,MAAMD,CAAS,IAAIf,CAAQ,EAoC5D,IAvCgB;AAAA,QAyCpB,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;"}
1
+ {"version":3,"file":"ReorderableList.js","sources":["../../../../src/components/Common/ReorderableList/ReorderableList.tsx"],"sourcesContent":["import { useRef, useState, useEffect, useCallback, useMemo } from 'react'\nimport classnames from 'classnames'\nimport { DndProvider } from 'react-dnd'\nimport { HTML5Backend } from 'react-dnd-html5-backend'\nimport type { ReactElement } from 'react'\nimport type { ReorderableListItem } from './ReorderableListTypes'\nimport styles from './ReorderableList.module.scss'\nimport { ReorderableItem } from './ReorderableItem'\nimport { DropZone } from './DropZone'\n\n// Helper functions\nfunction generateUniqueListId(prefix = 'reorderable-list'): string {\n return `${prefix}-${Math.random().toString(36).slice(2, 9)}`\n}\n\nfunction reorderArray<T>(array: T[], from: number, to: number): T[] {\n if (from === to || from < 0 || from >= array.length || to < 0 || to > array.length) {\n return [...array]\n }\n\n const newArray = [...array]\n const [removed] = newArray.splice(from, 1)\n\n if (removed === undefined) {\n return [...array]\n }\n\n newArray.splice(to, 0, removed)\n return newArray\n}\n\nfunction calculateNewOrder(\n currentOrder: number[],\n fromPosition: number,\n toPosition: number,\n): number[] {\n if (\n fromPosition === toPosition ||\n fromPosition < 0 ||\n fromPosition >= currentOrder.length ||\n toPosition < 0 ||\n toPosition > currentOrder.length\n ) {\n return [...currentOrder]\n }\n\n return reorderArray(currentOrder, fromPosition, toPosition)\n}\n\nfunction adjustTargetPosition(\n fromPosition: number,\n toPosition: number,\n source: 'keyboard' | 'dragdrop' = 'dragdrop',\n): number {\n // When dragging, adjust the target position if moving an element forward\n if (source === 'dragdrop' && fromPosition < toPosition) {\n return toPosition - 1\n }\n return toPosition\n}\n\ninterface ReorderableListAnimationConfig {\n duration?: number\n easing?: string\n disabled?: boolean\n}\n\ninterface ReorderableListProps {\n items: ReorderableListItem[]\n label: string\n onReorder?: (itemOrder: number[]) => void\n className?: string\n animationConfig?: ReorderableListAnimationConfig\n disabled?: boolean\n renderDragHandle?: (props: {\n id: string | number\n label: string\n isReordering: boolean\n isDragging: boolean\n }) => ReactElement\n dropZoneClassName?: string\n itemClassName?: string\n}\n\n// Default animation config\nconst DEFAULT_ANIMATION_CONFIG: ReorderableListAnimationConfig = {\n duration: 200,\n easing: 'ease-in-out',\n disabled: false,\n}\n\nexport function ReorderableList({\n items,\n label,\n onReorder,\n className,\n animationConfig = DEFAULT_ANIMATION_CONFIG,\n disabled = false,\n renderDragHandle,\n dropZoneClassName,\n itemClassName,\n}: ReorderableListProps) {\n const listId = useRef(generateUniqueListId()).current\n\n const [itemOrder, setItemOrder] = useState<number[]>(() =>\n Array.from({ length: items.length }, (_, i) => i),\n )\n const [activeDropZone, setActiveDropZone] = useState<number | null>(null)\n const [isDragging, setIsDragging] = useState(false)\n const [isReorderingActive, setIsReorderingActive] = useState(false)\n const [reorderingItemIndex, setReorderingItemIndex] = useState<number | null>(null)\n const pendingReorderRef = useRef<boolean>(false)\n const activeDropZonesRef = useRef<Record<number, boolean>>({})\n\n const mergedAnimationConfig = useMemo(\n () => ({\n ...DEFAULT_ANIMATION_CONFIG,\n ...animationConfig,\n }),\n [animationConfig],\n )\n\n useEffect(() => {\n if (items.length !== itemOrder.length) {\n setItemOrder(Array.from({ length: items.length }, (_, i) => i))\n }\n }, [items.length, itemOrder.length])\n\n // Debounced state setter for drop zones to prevent flickering\n const activateDropZone = useCallback((position: number) => {\n activeDropZonesRef.current = {}\n activeDropZonesRef.current[position] = true\n setActiveDropZone(position)\n }, [])\n\n const deactivateDropZone = useCallback((position: number) => {\n if (position in activeDropZonesRef.current) {\n activeDropZonesRef.current[position] = false\n }\n\n const activeDropZones = Object.entries(activeDropZonesRef.current)\n .filter(([_, isActive]) => isActive)\n .map(([pos]) => Number(pos))\n\n if (activeDropZones.length === 0) {\n setActiveDropZone(null)\n } else if (activeDropZones.length === 1) {\n setActiveDropZone(Number(activeDropZones[0]))\n }\n }, [])\n\n const moveItem = useCallback(\n (fromPosition: number, toPosition: number, source: 'keyboard' | 'dragdrop') => {\n if (\n disabled ||\n fromPosition === toPosition ||\n fromPosition < 0 ||\n fromPosition >= itemOrder.length ||\n toPosition < 0 ||\n toPosition > itemOrder.length\n ) {\n return\n }\n\n pendingReorderRef.current = true\n const movedItemIndex = itemOrder[fromPosition]\n\n // Use utility function to calculate new order\n const newOrder = calculateNewOrder(\n itemOrder,\n fromPosition,\n adjustTargetPosition(fromPosition, toPosition, source),\n )\n\n setItemOrder(newOrder)\n\n // Use the configured animation duration\n const animationDuration = mergedAnimationConfig.disabled ? 0 : mergedAnimationConfig.duration\n\n setTimeout(() => {\n setIsDragging(false)\n pendingReorderRef.current = false\n activeDropZonesRef.current = {}\n setActiveDropZone(null)\n\n if (source === 'keyboard') {\n const newPosition = newOrder.findIndex(idx => idx === movedItemIndex)\n\n if (newPosition >= 0) {\n setReorderingItemIndex(newPosition)\n const dragButtons = document.querySelectorAll(\n `[data-list-id=\"${listId}\"] .${styles.dragHandle} button`,\n )\n\n if (newPosition < dragButtons.length) {\n // Use requestAnimationFrame for smoother focus handling\n requestAnimationFrame(() => {\n if (dragButtons[newPosition]) {\n const buttonToFocus = dragButtons[newPosition] as HTMLElement\n buttonToFocus.focus()\n }\n })\n }\n }\n }\n\n if (onReorder) {\n onReorder(newOrder)\n }\n }, animationDuration)\n },\n [itemOrder, listId, onReorder, disabled, mergedAnimationConfig],\n )\n\n // If the list is disabled, don't render the DnD functionality\n if (disabled) {\n return (\n <div\n role=\"list\"\n aria-label={label}\n className={classnames(styles.reorderableList, className, styles.disabled)}\n data-list-id={listId}\n data-testid=\"reorderable-list\"\n >\n {itemOrder.map(itemIndex => {\n const item = items[itemIndex]\n if (!item) return null\n\n return (\n <div\n key={`item-static-${item.id || itemIndex}`}\n role=\"listitem\"\n className={classnames(styles.reorderableItem, itemClassName)}\n >\n <div className={styles.contentContainer}>{item.content}</div>\n </div>\n )\n })}\n </div>\n )\n }\n\n return (\n <DndProvider backend={HTML5Backend}>\n <div\n role=\"list\"\n aria-label={label}\n className={classnames(styles.reorderableList, className)}\n data-list-id={listId}\n data-testid=\"reorderable-list\"\n style={{\n ...(!mergedAnimationConfig.disabled &&\n ({\n '--animation-duration': `${mergedAnimationConfig.duration}ms`,\n '--animation-easing': mergedAnimationConfig.easing,\n } as React.CSSProperties)),\n }}\n >\n <DropZone\n position={0}\n listId={listId}\n isActive={activeDropZone === 0}\n onActivate={() => {\n activateDropZone(0)\n }}\n onDeactivate={() => {\n deactivateDropZone(0)\n }}\n onDrop={(fromPosition: number) => {\n if (!pendingReorderRef.current) {\n moveItem(fromPosition, 0, 'dragdrop')\n }\n }}\n className={dropZoneClassName}\n />\n\n {itemOrder.map((itemIndex, position) => {\n const item = items[itemIndex]\n if (!item) return null\n\n return (\n <div key={`item-container-${item.id || itemIndex}-${position}`}>\n <ReorderableItem\n key={`item-${item.id || itemIndex}`}\n item={item}\n index={position}\n moveItem={moveItem}\n itemCount={items.length}\n itemIndex={itemIndex}\n listId={listId}\n isDraggingAny={isDragging}\n setIsDragging={setIsDragging}\n isReorderingActive={isReorderingActive}\n setIsReorderingActive={setIsReorderingActive}\n isCurrentlyReordering={isReorderingActive && reorderingItemIndex === position}\n setReorderingItemIndex={setReorderingItemIndex}\n renderDragHandle={renderDragHandle}\n className={itemClassName}\n />\n\n <DropZone\n position={position + 1}\n listId={listId}\n isActive={activeDropZone === position + 1}\n onActivate={() => {\n activateDropZone(position + 1)\n }}\n onDeactivate={() => {\n deactivateDropZone(position + 1)\n }}\n onDrop={(fromPosition: number) => {\n if (!pendingReorderRef.current) {\n moveItem(fromPosition, position + 1, 'dragdrop')\n }\n }}\n className={dropZoneClassName}\n />\n </div>\n )\n })}\n </div>\n </DndProvider>\n )\n}\n"],"names":["generateUniqueListId","prefix","reorderArray","array","from","to","newArray","removed","calculateNewOrder","currentOrder","fromPosition","toPosition","adjustTargetPosition","source","DEFAULT_ANIMATION_CONFIG","ReorderableList","items","label","onReorder","className","animationConfig","disabled","renderDragHandle","dropZoneClassName","itemClassName","listId","useRef","itemOrder","setItemOrder","useState","_","i","activeDropZone","setActiveDropZone","isDragging","setIsDragging","isReorderingActive","setIsReorderingActive","reorderingItemIndex","setReorderingItemIndex","pendingReorderRef","activeDropZonesRef","mergedAnimationConfig","useMemo","useEffect","activateDropZone","useCallback","position","deactivateDropZone","activeDropZones","isActive","pos","moveItem","movedItemIndex","newOrder","animationDuration","newPosition","idx","dragButtons","styles","jsx","classnames","itemIndex","item","DndProvider","HTML5Backend","jsxs","DropZone","ReorderableItem"],"mappings":";;;;;;;;AAWA,SAASA,EAAqBC,IAAS,oBAA4B;AACjE,SAAO,GAAGA,CAAM,IAAI,KAAK,OAAA,EAAS,SAAS,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC;AAC5D;AAEA,SAASC,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AAAA,gBACA,eAAeS;AAAA,gBACf,eAAAC;AAAA,gBACA,oBAAAC;AAAA,gBACA,uBAAAC;AAAA,gBACA,uBAAuBD,KAAsBE,MAAwBS;AAAA,gBACrE,wBAAAR;AAAA,gBACA,kBAAAjB;AAAA,gBACA,WAAWE;AAAA,cAAA;AAAA,cAdN,QAAQuC,EAAK,MAAMD,CAAS;AAAA,YAAA;AAAA,YAiBnC,gBAAAF;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,UAAUpB,IAAW;AAAA,gBACrB,QAAAtB;AAAA,gBACA,UAAUO,MAAmBe,IAAW;AAAA,gBACxC,YAAY,MAAM;AAChB,kBAAAF,EAAiBE,IAAW,CAAC;AAAA,gBAC/B;AAAA,gBACA,cAAc,MAAM;AAClB,kBAAAC,EAAmBD,IAAW,CAAC;AAAA,gBACjC;AAAA,gBACA,QAAQ,CAACrC,MAAyB;AAChC,kBAAK8B,EAAkB,WACrBY,EAAS1C,GAAcqC,IAAW,GAAG,UAAU;AAAA,gBAEnD;AAAA,gBACA,WAAWxB;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,KAnCQ,kBAAkBwC,EAAK,MAAMD,CAAS,IAAIf,CAAQ,EAoC5D,IAvCgB;AAAA,QAyCpB,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;"}
@@ -2,29 +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";
9
+ import "../../../shared/constants.js";
10
+ import "react-i18next";
10
11
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
11
12
  import "react";
12
- const f = o.object({
13
+ const p = o.object({
13
14
  signature: o.string().min(1),
14
15
  confirmSignature: o.literal(!0)
15
- }), p = {
16
+ }), f = {
16
17
  signature: ""
17
18
  };
18
- function N({ onSubmit: m, children: i, formProps: n }) {
19
- const e = s({
20
- resolver: l(f),
21
- defaultValues: p,
19
+ function V({ onSubmit: m, children: i, formProps: n }) {
20
+ const t = s({
21
+ resolver: l(p),
22
+ defaultValues: f,
22
23
  ...n
23
24
  });
24
- 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 }) }) }) });
25
26
  }
26
27
  export {
27
- N as SignatureForm,
28
- f as SignatureFormSchema
28
+ V as SignatureForm,
29
+ p as SignatureFormSchema
29
30
  };
30
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,7 +1,7 @@
1
1
  import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
2
  import "../../../shared/constants.js";
3
- import "react-i18next";
4
3
  import "classnames";
4
+ import "react-i18next";
5
5
  import { ActionsLayout as p } from "../ActionsLayout/ActionsLayout.js";
6
6
  import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
7
  import "react";
@@ -1,10 +1,10 @@
1
1
  import { jsxs as n, Fragment as s, jsx as r } from "react/jsx-runtime";
2
2
  import "../../../shared/constants.js";
3
- import "react-i18next";
4
3
  import "classnames";
4
+ import "react-i18next";
5
+ import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
5
6
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
6
7
  import "react";
7
- import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
8
8
  import { CheckboxField as a } from "../Fields/CheckboxField/CheckboxField.js";
9
9
  function b({
10
10
  signatureLabel: e,
@@ -1,9 +1,9 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import h from "classnames";
3
+ import { Flex as u } from "../../Flex/Flex.js";
3
4
  import { BreadcrumbsDefaults as k } from "./BreadcrumbsTypes.js";
4
5
  import r from "./Breadcrumbs.module.scss.js";
5
6
  import { applyMissingDefaults as x } from "../../../../helpers/applyMissingDefaults.js";
6
- import { Flex as u } from "../../Flex/Flex.js";
7
7
  function I(p) {
8
8
  const f = x(p, k), {
9
9
  className: s,
@@ -1,2 +1,2 @@
1
1
  import { ButtonIconProps } from './ButtonTypes';
2
- export declare function ButtonIcon({ variant, className, ...props }: ButtonIconProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function ButtonIcon(rawProps: ButtonIconProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,14 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import n from "classnames";
3
- import { Button as e } from "./Button.js";
4
- import i from "./ButtonIcon.module.scss.js";
5
- function a({ variant: r, className: t, ...o }) {
6
- return /* @__PURE__ */ m(e, { ...o, variant: r, className: n(i.root, t), children: o.children });
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import a from "classnames";
3
+ import { ButtonIconDefaults as e } from "./ButtonTypes.js";
4
+ import { Button as i } from "./Button.js";
5
+ import c from "./ButtonIcon.module.scss.js";
6
+ import { applyMissingDefaults as f } from "../../../../helpers/applyMissingDefaults.js";
7
+ function x(o) {
8
+ const t = f(o, e), { children: r, variant: s, className: m, ...n } = t;
9
+ return /* @__PURE__ */ p(i, { ...n, variant: s, className: a(c.root, m), children: r });
7
10
  }
8
11
  export {
9
- a as ButtonIcon
12
+ x as ButtonIcon
10
13
  };
11
14
  //# sourceMappingURL=ButtonIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.js","sources":["../../../../../src/components/Common/UI/Button/ButtonIcon.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { type ButtonIconProps } from './ButtonTypes'\nimport { Button } from './Button'\nimport styles from './ButtonIcon.module.scss'\n\nexport function ButtonIcon({ variant, className, ...props }: ButtonIconProps) {\n return (\n <Button {...props} variant={variant} className={classNames(styles.root, className)}>\n {props.children}\n </Button>\n )\n}\n"],"names":["ButtonIcon","variant","className","props","jsx","Button","classNames","styles"],"mappings":";;;;AAKO,SAASA,EAAW,EAAE,SAAAC,GAAS,WAAAC,GAAW,GAAGC,KAA0B;AAC5E,SACE,gBAAAC,EAACC,GAAA,EAAQ,GAAGF,GAAO,SAAAF,GAAkB,WAAWK,EAAWC,EAAO,MAAML,CAAS,GAC9E,UAAAC,EAAM,SAAA,CACT;AAEJ;"}
1
+ {"version":3,"file":"ButtonIcon.js","sources":["../../../../../src/components/Common/UI/Button/ButtonIcon.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { ButtonIconDefaults, type ButtonIconProps } from './ButtonTypes'\nimport { Button } from './Button'\nimport styles from './ButtonIcon.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n\nexport function ButtonIcon(rawProps: ButtonIconProps) {\n const resolvedProps = applyMissingDefaults(rawProps, ButtonIconDefaults)\n const { children, variant, className, ...props } = resolvedProps\n\n return (\n <Button {...props} variant={variant} className={classNames(styles.root, className)}>\n {children}\n </Button>\n )\n}\n"],"names":["ButtonIcon","rawProps","resolvedProps","applyMissingDefaults","ButtonIconDefaults","children","variant","className","props","jsx","Button","classNames","styles"],"mappings":";;;;;;AAMO,SAASA,EAAWC,GAA2B;AACpD,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAkB,GACjE,EAAE,UAAAC,GAAU,SAAAC,GAAS,WAAAC,GAAW,GAAGC,MAAUN;AAEnD,SACE,gBAAAO,EAACC,GAAA,EAAQ,GAAGF,GAAO,SAAAF,GAAkB,WAAWK,EAAWC,EAAO,MAAML,CAAS,GAC9E,UAAAF,EAAA,CACH;AAEJ;"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
2
  import c from "classnames";
3
- import n from "./ProgressBar.module.scss.js";
4
- import { Flex as p } from "../../Flex/Flex.js";
3
+ import { Flex as n } from "../../Flex/Flex.js";
4
+ import p from "./ProgressBar.module.scss.js";
5
5
  import { VisuallyHidden as d } from "../../VisuallyHidden/VisuallyHidden.js";
6
6
  function y({
7
7
  className: i,
@@ -13,9 +13,9 @@ function y({
13
13
  const s = Math.max(1, Math.min(m, e)), l = {
14
14
  "--g-progress-bar-width": `${s * 100 / e}%`
15
15
  };
16
- return /* @__PURE__ */ t(p, { flexDirection: "column", children: [
16
+ return /* @__PURE__ */ t(n, { flexDirection: "column", children: [
17
17
  o && /* @__PURE__ */ r(o, {}),
18
- /* @__PURE__ */ r("div", { className: c(n.root, i), style: l, children: /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("progress", { "aria-label": a, value: s, max: e }) }) })
18
+ /* @__PURE__ */ r("div", { className: c(p.root, i), style: l, children: /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("progress", { "aria-label": a, value: s, max: e }) }) })
19
19
  ] });
20
20
  }
21
21
  export {
@@ -1,12 +1,12 @@
1
- const o = "_root_rni1o_1", n = "_tabsContainer_rni1o_4", t = "_dropdown_rni1o_86", r = {
1
+ const o = "_root_16h7m_1", t = "_tabsContainer_16h7m_4", n = "_dropdown_16h7m_87", r = {
2
2
  root: o,
3
- tabsContainer: n,
4
- dropdown: t
3
+ tabsContainer: t,
4
+ dropdown: n
5
5
  };
6
6
  export {
7
7
  r as default,
8
- t as dropdown,
8
+ n as dropdown,
9
9
  o as root,
10
- n as tabsContainer
10
+ t as tabsContainer
11
11
  };
12
12
  //# sourceMappingURL=Tabs.module.scss.js.map
@@ -8,8 +8,8 @@ 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
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
14
  import "react";
15
15
  import { BaseComponent as M } from "../../Base/Base.js";
@@ -4,9 +4,9 @@ import { useAssignSignatory as s, SignatoryAssignmentMode as o } from "./useAssi
4
4
  import r from "./AssignSignatorySelection.module.scss.js";
5
5
  import "../../../shared/constants.js";
6
6
  import "classnames";
7
+ import { RadioGroupField as a } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
7
8
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
8
9
  import "react";
9
- import { RadioGroupField as a } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
10
10
  const f = () => {
11
11
  const { t: n } = e("Company.AssignSignatory"), { onSignatoryAssignmentModeChange: t } = s();
12
12
  return /* @__PURE__ */ i("section", { className: r.container, children: /* @__PURE__ */ i(
@@ -16,10 +16,10 @@ import { useI18n as W } from "../../../../i18n/I18n.js";
16
16
  import { BaseComponent as X } from "../../../Base/Base.js";
17
17
  import { useBase as Z } from "../../../Base/useBase.js";
18
18
  import { Flex as $ } from "../../../Common/Flex/Flex.js";
19
+ import { companyEvents as c } from "../../../../shared/constants.js";
19
20
  import "react-i18next";
20
21
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
21
22
  import "react";
22
- import { companyEvents as c } from "../../../../shared/constants.js";
23
23
  import { formatDateToStringDate as V } from "../../../../helpers/dateFormatting.js";
24
24
  import { useMaskedTransform as tt, commonMasks as et } from "../../../../helpers/mask.js";
25
25
  function Rt(r) {
@@ -4,17 +4,17 @@ import { useCreateSignatory as c } from "./useCreateSignatory.js";
4
4
  import { Flex as o } from "../../../Common/Flex/Flex.js";
5
5
  import { Grid as n } from "../../../Common/Grid/Grid.js";
6
6
  import "classnames";
7
- import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
- import "react";
9
- import { STATES_ABBR as g } from "../../../../shared/constants.js";
10
- import { usePlaceholderSSN as h, normalizeSSN as f } from "../../../../helpers/ssn.js";
11
- import { TitleSelect as y } from "../TitleSelect.js";
12
- import { useMaskedTransform as b, commonMasks as S } from "../../../../helpers/mask.js";
13
7
  import { TextInputField as s } from "../../../Common/Fields/TextInputField/TextInputField.js";
14
- import { DatePickerField as D } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
8
+ import { DatePickerField as u } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
9
+ import { useComponentContext as g } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ import "react";
11
+ import { STATES_ABBR as h } from "../../../../shared/constants.js";
12
+ import { usePlaceholderSSN as f, normalizeSSN as y } from "../../../../helpers/ssn.js";
13
+ import { TitleSelect as b } from "../TitleSelect.js";
14
+ import { useMaskedTransform as S, commonMasks as D } from "../../../../helpers/mask.js";
15
15
  import { SelectField as M } from "../../../Common/Fields/SelectField/SelectField.js";
16
16
  const E = () => {
17
- const i = u(), { currentSignatory: t } = c(), { t: e } = p("Company.AssignSignatory"), d = h(t?.hasSsn), m = b(S.phoneMask);
17
+ const i = g(), { currentSignatory: t } = c(), { t: e } = p("Company.AssignSignatory"), d = f(t?.hasSsn), m = S(D.phoneMask);
18
18
  return /* @__PURE__ */ a(o, { flexDirection: "column", gap: 32, children: [
19
19
  /* @__PURE__ */ a(o, { flexDirection: "column", gap: 12, children: [
20
20
  /* @__PURE__ */ a("header", { children: [
@@ -50,7 +50,7 @@ const E = () => {
50
50
  isDisabled: !!t
51
51
  }
52
52
  ),
53
- /* @__PURE__ */ r(y, {}),
53
+ /* @__PURE__ */ r(b, {}),
54
54
  /* @__PURE__ */ r(
55
55
  s,
56
56
  {
@@ -68,12 +68,12 @@ const E = () => {
68
68
  label: e("signatoryDetails.ssn"),
69
69
  errorMessage: e("validations.ssn", { ns: "common" }),
70
70
  isRequired: !t?.hasSsn,
71
- transform: f,
71
+ transform: y,
72
72
  placeholder: d
73
73
  }
74
74
  ),
75
75
  /* @__PURE__ */ r(
76
- D,
76
+ u,
77
77
  {
78
78
  name: "birthday",
79
79
  label: e("signatoryDetails.birthday"),
@@ -112,7 +112,7 @@ const E = () => {
112
112
  M,
113
113
  {
114
114
  name: "state",
115
- options: g.map((l) => ({
115
+ options: h.map((l) => ({
116
116
  label: e(`statesHash.${l}`, { ns: "common" }),
117
117
  value: l
118
118
  })),
@@ -9,11 +9,12 @@ import "../../../Base/useBase.js";
9
9
  import "../../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
14
- const [c, d] = t("CreateSignatoryContext");
15
+ const [d, s] = t("CreateSignatoryContext");
15
16
  export {
16
- d as CreateSignatoryProvider,
17
- c as useCreateSignatory
17
+ s as CreateSignatoryProvider,
18
+ d as useCreateSignatory
18
19
  };
19
20
  //# sourceMappingURL=useCreateSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport { useCreateSignatory, CreateSignatoryProvider }\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAkBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport { useCreateSignatory, CreateSignatoryProvider }\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -14,10 +14,10 @@ import { useI18n as T } from "../../../../i18n/I18n.js";
14
14
  import { BaseComponent as U } from "../../../Base/Base.js";
15
15
  import { useBase as Y } from "../../../Base/useBase.js";
16
16
  import { Flex as q } from "../../../Common/Flex/Flex.js";
17
+ import { companyEvents as a } from "../../../../shared/constants.js";
17
18
  import "react-i18next";
18
19
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
19
20
  import "react";
20
- import { companyEvents as a } from "../../../../shared/constants.js";
21
21
  function mi(t) {
22
22
  return /* @__PURE__ */ i(U, { ...t, children: /* @__PURE__ */ i(w, { ...t, children: t.children }) });
23
23
  }
@@ -5,11 +5,11 @@ import { useTranslation as E } from "react-i18next";
5
5
  import { Flex as S } from "../../../Common/Flex/Flex.js";
6
6
  import { Grid as v } from "../../../Common/Grid/Grid.js";
7
7
  import "classnames";
8
+ import { TextInputField as a } from "../../../Common/Fields/TextInputField/TextInputField.js";
8
9
  import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
10
  import "react";
10
11
  import { nameValidation as l } from "../../../../helpers/validations.js";
11
12
  import { TitleSelect as x } from "../TitleSelect.js";
12
- import { TextInputField as a } from "../../../Common/Fields/TextInputField/TextInputField.js";
13
13
  const m = "email_mismatch", A = r.object({
14
14
  firstName: l,
15
15
  lastName: l,
@@ -9,11 +9,12 @@ import "../../../Base/useBase.js";
9
9
  import "../../../../shared/constants.js";
10
10
  import "classnames";
11
11
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
12
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
12
13
  import "dompurify";
13
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
14
- const [I, S] = t("InviteSignatoryContext");
15
+ const [S, c] = t("InviteSignatoryContext");
15
16
  export {
16
- S as InviteSignatoryProvider,
17
- I as useInviteSignatory
17
+ c as InviteSignatoryProvider,
18
+ S as useInviteSignatory
18
19
  };
19
20
  //# sourceMappingURL=useInviteSignatory.js.map