@gusto/embedded-react-sdk 0.10.5 → 0.10.6-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/Base/Base.js +18 -19
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/OnboardingStatusBadge/index.d.ts +1 -1
  5. package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
  6. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
  7. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  8. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
  9. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  10. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
  11. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  12. package/dist/components/Common/TaxInputs/TaxInputs.d.ts +1 -0
  13. package/dist/components/Common/TaxInputs/TaxInputs.js +100 -80
  14. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/AssignSignatory.js +11 -13
  16. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  18. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  19. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  20. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  21. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +0 -1
  22. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  23. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
  24. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  25. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
  26. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  27. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  28. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +3 -4
  29. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  30. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
  31. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  32. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
  33. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  34. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  35. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
  36. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
  37. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  38. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -8
  39. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  40. package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
  41. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  42. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  43. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  44. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  45. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
  46. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  47. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  48. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  49. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +15 -17
  50. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  51. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  52. package/dist/components/Company/DocumentSigner/DocumentSigner.js +24 -22
  53. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  54. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -9
  55. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  56. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  57. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  58. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  59. package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -17
  60. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  61. package/dist/components/Company/FederalTaxes/Form.js +2 -3
  62. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  63. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
  64. package/dist/components/Company/Industry/Actions.js +5 -6
  65. package/dist/components/Company/Industry/Actions.js.map +1 -1
  66. package/dist/components/Company/Industry/Context.js +1 -1
  67. package/dist/components/Company/Industry/Edit.js +10 -11
  68. package/dist/components/Company/Industry/Edit.js.map +1 -1
  69. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  70. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  71. package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
  72. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  73. package/dist/components/Company/Locations/LocationForm/LocationForm.js +7 -9
  74. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  75. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
  76. package/dist/components/Company/Locations/Locations.js +25 -21
  77. package/dist/components/Company/Locations/Locations.js.map +1 -1
  78. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  79. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  80. package/dist/components/Company/Locations/LocationsList/List.js +2 -3
  81. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  82. package/dist/components/Company/Locations/LocationsList/LocationsList.js +9 -11
  83. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  84. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
  85. package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
  86. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  87. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +2 -3
  88. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  89. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -4
  90. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  91. package/dist/components/Company/OnboardingOverview/context.js +1 -1
  92. package/dist/components/Company/PaySchedule/PaySchedule.js +16 -18
  93. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  94. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -11
  95. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  96. package/dist/components/Company/PaySchedule/_parts/Edit.js +25 -26
  97. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  98. package/dist/components/Company/PaySchedule/_parts/Head.js +2 -3
  99. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  100. package/dist/components/Company/PaySchedule/_parts/List.js +5 -6
  101. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  102. package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
  103. package/dist/components/Company/StateTaxes/StateTaxes.js +22 -18
  104. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  105. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  106. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  107. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +14 -14
  108. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  109. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
  110. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  111. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  112. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  113. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  114. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
  115. package/dist/components/Contractor/Address/Address.js +0 -2
  116. package/dist/components/Contractor/Address/Address.js.map +1 -1
  117. package/dist/components/Contractor/Address/Form.js +2 -3
  118. package/dist/components/Contractor/Address/Form.js.map +1 -1
  119. package/dist/components/Contractor/Address/useAddress.js +1 -1
  120. package/dist/components/Contractor/List/index.js +2 -3
  121. package/dist/components/Contractor/List/index.js.map +1 -1
  122. package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
  123. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  124. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
  125. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  126. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  127. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  128. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  129. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  130. package/dist/components/Employee/Compensation/Actions.js +4 -5
  131. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  132. package/dist/components/Employee/Compensation/Edit.js +2 -3
  133. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  134. package/dist/components/Employee/Compensation/List.js +5 -6
  135. package/dist/components/Employee/Compensation/List.js.map +1 -1
  136. package/dist/components/Employee/Deductions/Actions.js +8 -9
  137. package/dist/components/Employee/Deductions/Actions.js.map +1 -1
  138. package/dist/components/Employee/Deductions/DeductionForm.js +2 -3
  139. package/dist/components/Employee/Deductions/DeductionForm.js.map +1 -1
  140. package/dist/components/Employee/Deductions/DeductionsList.js +2 -3
  141. package/dist/components/Employee/Deductions/DeductionsList.js.map +1 -1
  142. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +2 -3
  143. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +1 -1
  144. package/dist/components/Employee/Deductions/useDeductions.js +1 -1
  145. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
  146. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  147. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -12
  148. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  149. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
  150. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  151. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  152. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +8 -10
  153. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  154. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  155. package/dist/components/Employee/EmployeeList/Actions.js +4 -5
  156. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  157. package/dist/components/Employee/EmployeeList/EmployeeList.js +9 -11
  158. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  159. package/dist/components/Employee/EmployeeList/Head.js +2 -3
  160. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  161. package/dist/components/Employee/EmployeeList/List.js +2 -3
  162. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  163. package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
  164. package/dist/components/Employee/Landing/Landing.js +6 -7
  165. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  166. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  167. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  168. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -3
  169. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  170. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  171. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  172. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
  173. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  174. package/dist/components/Employee/PaymentMethod/Split.js +2 -3
  175. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  176. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
  177. package/dist/components/Employee/Profile/Actions.js +6 -7
  178. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  179. package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
  180. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  181. package/dist/components/Employee/Profile/HomeAddress.js +4 -5
  182. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  183. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
  184. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  185. package/dist/components/Employee/Profile/useProfile.js +1 -1
  186. package/dist/components/Employee/Taxes/Actions.js +7 -8
  187. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  188. package/dist/components/Employee/Taxes/FederalForm.js +4 -5
  189. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  190. package/dist/components/Employee/Taxes/useTaxes.js +1 -1
  191. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  192. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  193. package/dist/shared/constants.js +1 -1
  194. package/dist/shared/constants.js.map +1 -1
  195. package/dist/style.css +1 -1
  196. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Edit.js","sources":["../../../../src/components/Employee/Compensation/Edit.tsx"],"sourcesContent":["import { useEffect, useMemo } from 'react'\nimport { useFormContext, useWatch } from 'react-hook-form'\nimport { Trans, useTranslation } from 'react-i18next'\nimport {\n type CompensationInputs,\n useCompensation,\n rateMinimumError,\n rateExemptThresholdError,\n} from './useCompensation'\nimport { FLSA_OVERTIME_SALARY_LIMIT, FlsaStatus, PAY_PERIODS } from '@/shared/constants'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport {\n NumberInputField,\n SelectField,\n TextInputField,\n SwitchField,\n RadioGroupField,\n ComboBoxField,\n} from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { WA_RISK_CLASS_CODES } from '@/models/WA_RISK_CODES'\n\nexport interface SelectCategory {\n id: string\n name: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Employee.Compensation')\n const format = useNumberFormatter('currency')\n const Components = useComponentContext()\n\n const stateWcRiskOptions = useMemo(\n () => WA_RISK_CLASS_CODES.map(({ code, description }) => ({ value: code, label: description })),\n [],\n )\n\n const {\n control,\n register,\n setValue,\n formState: { errors, defaultValues },\n } = useFormContext<CompensationInputs>()\n\n const watchedFlsaStatus = useWatch({ control, name: 'flsaStatus' })\n const watchedStateWcCovered = useWatch({ control, name: 'stateWcCovered' })\n const { currentJob, mode, minimumWages, handleFlsaChange, state, showTwoPercentStakeholder } =\n useCompensation()\n\n /**Correctly set payment unit selected option and rate based on flsa status, falling back to default */\n useEffect(() => {\n if (watchedFlsaStatus === FlsaStatus.OWNER) {\n setValue('paymentUnit', 'Paycheck')\n } else if (\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n ) {\n setValue('paymentUnit', 'Year')\n setValue('rate', 0)\n } else if (defaultValues?.paymentUnit) {\n setValue('paymentUnit', defaultValues.paymentUnit)\n }\n }, [watchedFlsaStatus, setValue, defaultValues?.paymentUnit])\n\n if (\n !(\n mode === 'ADD_INITIAL_JOB' ||\n mode === 'ADD_ADDITIONAL_JOB' ||\n mode === 'EDIT_INITIAL_JOB' ||\n mode === 'EDIT_ADDITIONAL_JOB'\n )\n )\n return\n\n const classificationOptions = (Object.keys(FlsaStatus) as Array<keyof typeof FlsaStatus>).map(\n key => ({\n value: FlsaStatus[key],\n label: t(`flsaStatusLabels.${FlsaStatus[key]}`),\n }),\n )\n\n const paymentUnitOptions = [\n { value: PAY_PERIODS.HOUR, label: t('paymentUnitOptions.Hour') },\n { value: PAY_PERIODS.WEEK, label: t('paymentUnitOptions.Week') },\n { value: PAY_PERIODS.MONTH, label: t('paymentUnitOptions.Month') },\n { value: PAY_PERIODS.YEAR, label: t('paymentUnitOptions.Year') },\n { value: PAY_PERIODS.PAYCHECK, label: t('paymentUnitOptions.Paycheck') },\n ]\n\n const isFlsaSelectionEnabled =\n watchedFlsaStatus !== FlsaStatus.NONEXEMPT || currentJob?.primary || mode === 'ADD_INITIAL_JOB'\n\n const isAdjustMinimumWageEnabled =\n watchedFlsaStatus === FlsaStatus.NONEXEMPT && minimumWages.length > 0\n\n let rateErrorMessage = t('validations.rate')\n if (errors.rate?.message === rateMinimumError) {\n rateErrorMessage = t('validations.nonZeroRate')\n } else if (errors.rate?.message === rateExemptThresholdError) {\n rateErrorMessage = t('validations.rateExemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n })\n }\n\n return (\n <>\n <TextInputField\n name=\"jobTitle\"\n label={t('jobTitle')}\n isRequired\n errorMessage={t('validations.title')}\n />\n {/* hiding flsa selection for secondary jobs */}\n {!isFlsaSelectionEnabled && <input type=\"hidden\" {...register('flsaStatus')} />}\n {isFlsaSelectionEnabled && (\n <SelectField\n name=\"flsaStatus\"\n label={t('employeeClassification')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationCTA\"\n components={{ classificationCta: <Components.Link /> }}\n />\n }\n errorMessage={t('validations.exemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n })}\n options={classificationOptions}\n isRequired\n isDisabled={!isFlsaSelectionEnabled}\n onChange={handleFlsaChange}\n />\n )}\n <NumberInputField\n name=\"rate\"\n label={t('amount')}\n format=\"currency\"\n min={0}\n errorMessage={rateErrorMessage}\n isRequired\n isDisabled={\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n }\n />\n {isAdjustMinimumWageEnabled && (\n <>\n <SwitchField\n name=\"adjustForMinimumWage\"\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n />\n <SelectField\n name=\"minimumWageId\"\n label={t('minimumWageLabel')}\n description={t('minimumWageDescription')}\n options={minimumWages.map(wage => ({\n value: wage.uuid,\n label: `${format(Number(wage.wage))} - ${wage.authority}: ${wage.notes ?? ''}`,\n }))}\n errorMessage={t('validations.minimumWage')}\n />\n </>\n )}\n <SelectField\n name=\"paymentUnit\"\n label={t('paymentUnitLabel')}\n description={t('paymentUnitDescription')}\n options={paymentUnitOptions}\n errorMessage={t('validations.paymentUnit')}\n isDisabled={\n watchedFlsaStatus === FlsaStatus.OWNER ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n }\n />\n {showTwoPercentStakeholder && (\n <Components.Checkbox label={t('twoPercentStakeholderLabel')} name=\"twoPercentShareholder\" />\n )}\n {state === 'WA' && (\n <>\n <RadioGroupField\n name=\"stateWcCovered\"\n label={t('stateWcCoveredLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"stateWcCoveredDescription\"\n components={{\n wcLink: (\n <Components.Link\n href=\"https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n options={[\n { label: t('stateWcCoveredOptions.yes'), value: true },\n { label: t('stateWcCoveredOptions.no'), value: false },\n ]}\n />\n {watchedStateWcCovered && (\n <ComboBoxField\n name=\"stateWcClassCode\"\n label={t('stateWcClassCodeLabel')}\n options={stateWcRiskOptions}\n errorMessage={t('validations.stateWcClassCode')}\n placeholder={t('stateWcClassCodeLabel')}\n />\n )}\n </>\n )}\n </>\n )\n}\n"],"names":["Edit","t","useTranslation","format","useNumberFormatter","Components","useComponentContext","stateWcRiskOptions","useMemo","WA_RISK_CLASS_CODES","code","description","control","register","setValue","errors","defaultValues","useFormContext","watchedFlsaStatus","useWatch","watchedStateWcCovered","currentJob","mode","minimumWages","handleFlsaChange","state","showTwoPercentStakeholder","useCompensation","useEffect","FlsaStatus","classificationOptions","key","paymentUnitOptions","PAY_PERIODS","isFlsaSelectionEnabled","isAdjustMinimumWageEnabled","rateErrorMessage","rateMinimumError","rateExemptThresholdError","FLSA_OVERTIME_SALARY_LIMIT","jsxs","Fragment","jsx","TextInputField","SelectField","Trans","NumberInputField","SwitchField","wage","RadioGroupField","ComboBoxField"],"mappings":";;;;;;;;;;;;;;;;AA2BO,MAAMA,KAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAASC,EAAmB,UAAU,GACtCC,IAAaC,EAAoB,GAEjCC,IAAqBC;AAAA,IACzB,MAAMC,EAAoB,IAAI,CAAC,EAAE,MAAAC,GAAM,aAAAC,EAAY,OAAO,EAAE,OAAOD,GAAM,OAAOC,EAAc,EAAA;AAAA,IAC9F,CAAA;AAAA,EACF,GAEM;AAAA,IACJ,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,GAAQ,eAAAC,EAAc;AAAA,MACjCC,EAAmC,GAEjCC,IAAoBC,EAAS,EAAE,SAAAP,GAAS,MAAM,cAAc,GAC5DQ,IAAwBD,EAAS,EAAE,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K;AAAA,oBACL,QAAO;AAAA,oBACP,KAAI;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACN;AAAA,YAEJ;AAAA,UACF;AAAA,UAEF,SAAS;AAAA,YACP,EAAE,OAAOJ,EAAE,2BAA2B,GAAG,OAAO,GAAK;AAAA,YACrD,EAAE,OAAOA,EAAE,0BAA0B,GAAG,OAAO,GAAM;AAAA,UAAA;AAAA,QACvD;AAAA,MACF;AAAA,MACCmB,KACC,gBAAAsB;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOjD,EAAE,uBAAuB;AAAA,UAChC,SAASM;AAAA,UACT,cAAcN,EAAE,8BAA8B;AAAA,UAC9C,aAAaA,EAAE,uBAAuB;AAAA,QAAA;AAAA,MAAA;AAAA,IACxC,EAEJ,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Edit.js","sources":["../../../../src/components/Employee/Compensation/Edit.tsx"],"sourcesContent":["import { useEffect, useMemo } from 'react'\nimport { useFormContext, useWatch } from 'react-hook-form'\nimport { Trans, useTranslation } from 'react-i18next'\nimport {\n type CompensationInputs,\n useCompensation,\n rateMinimumError,\n rateExemptThresholdError,\n} from './useCompensation'\nimport { FLSA_OVERTIME_SALARY_LIMIT, FlsaStatus, PAY_PERIODS } from '@/shared/constants'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport {\n NumberInputField,\n SelectField,\n TextInputField,\n SwitchField,\n RadioGroupField,\n ComboBoxField,\n} from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { WA_RISK_CLASS_CODES } from '@/models/WA_RISK_CODES'\n\nexport interface SelectCategory {\n id: string\n name: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Employee.Compensation')\n const format = useNumberFormatter('currency')\n const Components = useComponentContext()\n\n const stateWcRiskOptions = useMemo(\n () => WA_RISK_CLASS_CODES.map(({ code, description }) => ({ value: code, label: description })),\n [],\n )\n\n const {\n control,\n register,\n setValue,\n formState: { errors, defaultValues },\n } = useFormContext<CompensationInputs>()\n\n const watchedFlsaStatus = useWatch({ control, name: 'flsaStatus' })\n const watchedStateWcCovered = useWatch({ control, name: 'stateWcCovered' })\n const { currentJob, mode, minimumWages, handleFlsaChange, state, showTwoPercentStakeholder } =\n useCompensation()\n\n /**Correctly set payment unit selected option and rate based on flsa status, falling back to default */\n useEffect(() => {\n if (watchedFlsaStatus === FlsaStatus.OWNER) {\n setValue('paymentUnit', 'Paycheck')\n } else if (\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n ) {\n setValue('paymentUnit', 'Year')\n setValue('rate', 0)\n } else if (defaultValues?.paymentUnit) {\n setValue('paymentUnit', defaultValues.paymentUnit)\n }\n }, [watchedFlsaStatus, setValue, defaultValues?.paymentUnit])\n\n if (\n !(\n mode === 'ADD_INITIAL_JOB' ||\n mode === 'ADD_ADDITIONAL_JOB' ||\n mode === 'EDIT_INITIAL_JOB' ||\n mode === 'EDIT_ADDITIONAL_JOB'\n )\n )\n return\n\n const classificationOptions = (Object.keys(FlsaStatus) as Array<keyof typeof FlsaStatus>).map(\n key => ({\n value: FlsaStatus[key],\n label: t(`flsaStatusLabels.${FlsaStatus[key]}`),\n }),\n )\n\n const paymentUnitOptions = [\n { value: PAY_PERIODS.HOUR, label: t('paymentUnitOptions.Hour') },\n { value: PAY_PERIODS.WEEK, label: t('paymentUnitOptions.Week') },\n { value: PAY_PERIODS.MONTH, label: t('paymentUnitOptions.Month') },\n { value: PAY_PERIODS.YEAR, label: t('paymentUnitOptions.Year') },\n { value: PAY_PERIODS.PAYCHECK, label: t('paymentUnitOptions.Paycheck') },\n ]\n\n const isFlsaSelectionEnabled =\n watchedFlsaStatus !== FlsaStatus.NONEXEMPT || currentJob?.primary || mode === 'ADD_INITIAL_JOB'\n\n const isAdjustMinimumWageEnabled =\n watchedFlsaStatus === FlsaStatus.NONEXEMPT && minimumWages.length > 0\n\n let rateErrorMessage = t('validations.rate')\n if (errors.rate?.message === rateMinimumError) {\n rateErrorMessage = t('validations.nonZeroRate')\n } else if (errors.rate?.message === rateExemptThresholdError) {\n rateErrorMessage = t('validations.rateExemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n })\n }\n\n return (\n <>\n <TextInputField\n name=\"jobTitle\"\n label={t('jobTitle')}\n isRequired\n errorMessage={t('validations.title')}\n />\n {/* hiding flsa selection for secondary jobs */}\n {!isFlsaSelectionEnabled && <input type=\"hidden\" {...register('flsaStatus')} />}\n {isFlsaSelectionEnabled && (\n <SelectField\n name=\"flsaStatus\"\n label={t('employeeClassification')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationCTA\"\n components={{ classificationCta: <Components.Link /> }}\n />\n }\n errorMessage={t('validations.exemptThreshold', {\n limit: format(FLSA_OVERTIME_SALARY_LIMIT),\n })}\n options={classificationOptions}\n isRequired\n isDisabled={!isFlsaSelectionEnabled}\n onChange={handleFlsaChange}\n />\n )}\n <NumberInputField\n name=\"rate\"\n label={t('amount')}\n format=\"currency\"\n min={0}\n errorMessage={rateErrorMessage}\n isRequired\n isDisabled={\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n }\n />\n {isAdjustMinimumWageEnabled && (\n <>\n <SwitchField\n name=\"adjustForMinimumWage\"\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n />\n <SelectField\n name=\"minimumWageId\"\n label={t('minimumWageLabel')}\n description={t('minimumWageDescription')}\n options={minimumWages.map(wage => ({\n value: wage.uuid,\n label: `${format(Number(wage.wage))} - ${wage.authority}: ${wage.notes ?? ''}`,\n }))}\n errorMessage={t('validations.minimumWage')}\n />\n </>\n )}\n <SelectField\n name=\"paymentUnit\"\n label={t('paymentUnitLabel')}\n description={t('paymentUnitDescription')}\n options={paymentUnitOptions}\n errorMessage={t('validations.paymentUnit')}\n isDisabled={\n watchedFlsaStatus === FlsaStatus.OWNER ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT ||\n watchedFlsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT\n }\n />\n {showTwoPercentStakeholder && (\n <Components.Checkbox label={t('twoPercentStakeholderLabel')} name=\"twoPercentShareholder\" />\n )}\n {state === 'WA' && (\n <>\n <RadioGroupField\n name=\"stateWcCovered\"\n label={t('stateWcCoveredLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"stateWcCoveredDescription\"\n components={{\n wcLink: (\n <Components.Link\n href=\"https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n options={[\n { label: t('stateWcCoveredOptions.yes'), value: true },\n { label: t('stateWcCoveredOptions.no'), value: false },\n ]}\n />\n {watchedStateWcCovered && (\n <ComboBoxField\n name=\"stateWcClassCode\"\n label={t('stateWcClassCodeLabel')}\n options={stateWcRiskOptions}\n errorMessage={t('validations.stateWcClassCode')}\n placeholder={t('stateWcClassCodeLabel')}\n />\n )}\n </>\n )}\n </>\n )\n}\n"],"names":["Edit","t","useTranslation","format","useNumberFormatter","Components","useComponentContext","stateWcRiskOptions","useMemo","WA_RISK_CLASS_CODES","code","description","control","register","setValue","errors","defaultValues","useFormContext","watchedFlsaStatus","useWatch","watchedStateWcCovered","currentJob","mode","minimumWages","handleFlsaChange","state","showTwoPercentStakeholder","useCompensation","useEffect","FlsaStatus","classificationOptions","key","paymentUnitOptions","PAY_PERIODS","isFlsaSelectionEnabled","isAdjustMinimumWageEnabled","rateErrorMessage","rateMinimumError","rateExemptThresholdError","FLSA_OVERTIME_SALARY_LIMIT","jsxs","Fragment","jsx","TextInputField","SelectField","Trans","NumberInputField","SwitchField","wage","RadioGroupField","ComboBoxField"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A,QACzC,YACEiB,MAAsBW,EAAW,SACjCX,MAAsBW,EAAW,6BACjCX,MAAsBW,EAAW;AAAA,MAAA;AAAA,IAErC;AAAA,IACCH,KACE,gBAAAgB,EAAArC,EAAW,UAAX,EAAoB,OAAOJ,EAAE,4BAA4B,GAAG,MAAK,yBAAwB;AAAA,IAE3FwB,MAAU,QAEP,gBAAAe,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACO;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOhD,EAAE,qBAAqB;AAAA,UAC9B,aACE,gBAAAyC;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,GAAA5C;AAAA,cACA,SAAQ;AAAA,cACR,YAAY;AAAA,gBACV,QACE,gBAAAyC;AAAA,kBAACrC,EAAW;AAAA,kBAAX;AAAA,oBACC,MAAK;AAAA,oBACL,QAAO;AAAA,oBACP,KAAI;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACN;AAAA,YAEJ;AAAA,UACF;AAAA,UAEF,SAAS;AAAA,YACP,EAAE,OAAOJ,EAAE,2BAA2B,GAAG,OAAO,GAAK;AAAA,YACrD,EAAE,OAAOA,EAAE,0BAA0B,GAAG,OAAO,GAAM;AAAA,UAAA;AAAA,QACvD;AAAA,MACF;AAAA,MACCmB,KACC,gBAAAsB;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOjD,EAAE,uBAAuB;AAAA,UAChC,SAASM;AAAA,UACT,cAAcN,EAAE,8BAA8B;AAAA,UAC9C,aAAaA,EAAE,uBAAuB;AAAA,QAAA;AAAA,MAAA;AAAA,IACxC,EAEJ,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -3,12 +3,11 @@ import { useTranslation as p } from "react-i18next";
3
3
  import { useCompensation as d } from "./useCompensation.js";
4
4
  import C from "../../../assets/icons/pencil.svg.js";
5
5
  import c from "../../../assets/icons/trashcan.svg.js";
6
- import "classnames";
7
6
  import { HamburgerMenu as f } from "../../Common/HamburgerMenu/HamburgerMenu.js";
8
7
  import { useDataView as y } from "../../Common/DataView/useDataView.js";
9
8
  import { DataView as g } from "../../Common/DataView/DataView.js";
10
- const P = () => {
11
- const { employeeJobs: i, mode: o, isPending: r, handleEdit: l, handleDelete: s } = d(), { t } = p("Employee.Compensation"), { ...m } = y({
9
+ const D = () => {
10
+ const { employeeJobs: i, mode: o, isPending: l, handleEdit: r, handleDelete: s } = d(), { t } = p("Employee.Compensation"), { ...m } = y({
12
11
  data: i,
13
12
  columns: [
14
13
  {
@@ -46,7 +45,7 @@ const P = () => {
46
45
  label: t("allCompensations.editCta"),
47
46
  icon: /* @__PURE__ */ a(C, { "aria-hidden": !0 }),
48
47
  onClick: () => {
49
- l(e.uuid);
48
+ r(e.uuid);
50
49
  }
51
50
  },
52
51
  ...e.primary ? [] : [
@@ -59,7 +58,7 @@ const P = () => {
59
58
  }
60
59
  ]
61
60
  ],
62
- isLoading: r
61
+ isLoading: l
63
62
  }
64
63
  )
65
64
  });
@@ -67,6 +66,6 @@ const P = () => {
67
66
  return /* @__PURE__ */ a(g, { "data-testid": "data-view", label: t("allCompensations.tableLabel"), ...m });
68
67
  };
69
68
  export {
70
- P as List
69
+ D as List
71
70
  };
72
71
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/Compensation/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport { useCompensation } from './useCompensation'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { employeeJobs, mode, isPending, handleEdit, handleDelete } = useCompensation()\n const { t } = useTranslation('Employee.Compensation')\n\n const { ...dataViewProps } = useDataView({\n data: employeeJobs,\n columns: [\n {\n key: 'title',\n title: t('allCompensations.jobColumn'),\n render: (job: Job) => job.title || '',\n },\n {\n key: 'flsaStatus',\n title: t('allCompensations.typeColumn'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : null\n },\n },\n {\n key: 'rate',\n title: t('allCompensations.amountColumn'),\n render: (job: Job) => job.rate?.toString() || '',\n },\n {\n key: 'paymentUnit',\n title: t('allCompensations.perColumn'),\n render: (job: Job) => job.paymentUnit || '',\n },\n ],\n itemMenu: (job: Job) => (\n <HamburgerMenu\n triggerLabel={t('hamburgerTitle')}\n items={[\n {\n label: t('allCompensations.editCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job.uuid)\n },\n },\n ...(!job.primary\n ? [\n {\n label: t('allCompensations.deleteCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n handleDelete(job.uuid)\n },\n },\n ]\n : []),\n ]}\n isLoading={isPending}\n />\n ),\n })\n\n if (mode !== 'LIST') {\n return\n }\n\n return (\n <DataView data-testid=\"data-view\" label={t('allCompensations.tableLabel')} {...dataViewProps} />\n )\n}\n"],"names":["List","employeeJobs","mode","isPending","handleEdit","handleDelete","useCompensation","useTranslation","dataViewProps","useDataView","job","flsaStatus","comp","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,WAAAC,GAAW,YAAAC,GAAY,cAAAC,MAAiBC,EAAgB,GAC9E,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAE9C,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,QACrC,QAAQ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AAE,6BAA6B,GAAI,GAAGT,GAAe;AAElG;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../src/components/Employee/Compensation/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type Job } from '@gusto/embedded-api/models/components/job'\nimport { useCompensation } from './useCompensation'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { DataView, useDataView } from '@/components/Common'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const List = () => {\n const { employeeJobs, mode, isPending, handleEdit, handleDelete } = useCompensation()\n const { t } = useTranslation('Employee.Compensation')\n\n const { ...dataViewProps } = useDataView({\n data: employeeJobs,\n columns: [\n {\n key: 'title',\n title: t('allCompensations.jobColumn'),\n render: (job: Job) => job.title || '',\n },\n {\n key: 'flsaStatus',\n title: t('allCompensations.typeColumn'),\n render: (job: Job) => {\n const flsaStatus = job.compensations?.find(\n comp => comp.uuid === job.currentCompensationUuid,\n )?.flsaStatus\n return flsaStatus !== undefined ? t(`flsaStatusLabels.${flsaStatus}`) : null\n },\n },\n {\n key: 'rate',\n title: t('allCompensations.amountColumn'),\n render: (job: Job) => job.rate?.toString() || '',\n },\n {\n key: 'paymentUnit',\n title: t('allCompensations.perColumn'),\n render: (job: Job) => job.paymentUnit || '',\n },\n ],\n itemMenu: (job: Job) => (\n <HamburgerMenu\n triggerLabel={t('hamburgerTitle')}\n items={[\n {\n label: t('allCompensations.editCta'),\n icon: <PencilSvg aria-hidden />,\n onClick: () => {\n handleEdit(job.uuid)\n },\n },\n ...(!job.primary\n ? [\n {\n label: t('allCompensations.deleteCta'),\n icon: <TrashCanSvg aria-hidden />,\n onClick: () => {\n handleDelete(job.uuid)\n },\n },\n ]\n : []),\n ]}\n isLoading={isPending}\n />\n ),\n })\n\n if (mode !== 'LIST') {\n return\n }\n\n return (\n <DataView data-testid=\"data-view\" label={t('allCompensations.tableLabel')} {...dataViewProps} />\n )\n}\n"],"names":["List","employeeJobs","mode","isPending","handleEdit","handleDelete","useCompensation","useTranslation","dataViewProps","useDataView","job","flsaStatus","comp","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,WAAAC,GAAW,YAAAC,GAAY,cAAAC,MAAiBC,EAAgB,GAC9E,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAE9C,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACS,MAAaA,EAAI,SAAS;AAAA,MACrC;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,6BAA6B;AAAA,QACtC,QAAQ,CAACA,MAAa;AACd,gBAAAC,IAAaD,EAAI,eAAe;AAAA,YACpC,CAAAE,MAAQA,EAAK,SAASF,EAAI;AAAA,UAAA,GACzB;AACH,iBAAOC,MAAe,SAAY,EAAE,oBAAoBA,CAAU,EAAE,IAAI;AAAA,QAAA;AAAA,MAE5E;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,+BAA+B;AAAA,QACxC,QAAQ,CAACD,MAAaA,EAAI,MAAM,cAAc;AAAA,MAChD;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,4BAA4B;AAAA,QACrC,QAAQ,CAACA,MAAaA,EAAI,eAAe;AAAA,MAAA;AAAA,IAE7C;AAAA,IACA,UAAU,CAACA,MACT,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,cAAc,EAAE,gBAAgB;AAAA,QAChC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,0BAA0B;AAAA,YACnC,MAAM,gBAAAD,EAACE,GAAU,EAAA,eAAW,GAAC,CAAA;AAAA,YAC7B,SAAS,MAAM;AACb,cAAAX,EAAWM,EAAI,IAAI;AAAA,YAAA;AAAA,UAEvB;AAAA,UACA,GAAKA,EAAI,UAUL,CAAA,IATA;AAAA,YACE;AAAA,cACE,OAAO,EAAE,4BAA4B;AAAA,cACrC,MAAM,gBAAAG,EAACG,GAAY,EAAA,eAAW,GAAC,CAAA;AAAA,cAC/B,SAAS,MAAM;AACb,gBAAAX,EAAaK,EAAI,IAAI;AAAA,cAAA;AAAA,YACvB;AAAA,UACF;AAAA,QAGR;AAAA,QACA,WAAWP;AAAA,MAAA;AAAA,IAAA;AAAA,EACb,CAEH;AAED,MAAID,MAAS;AAKX,WAAA,gBAAAW,EAACI,KAAS,eAAY,aAAY,OAAO,EAAE,6BAA6B,GAAI,GAAGT,GAAe;AAElG;"}
@@ -1,26 +1,25 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { useTranslation as d } from "react-i18next";
3
3
  import { useDeductions as m } from "./useDeductions.js";
4
- import "classnames";
5
4
  import { ActionsLayout as u } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as l } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const L = () => {
8
- const { mode: o, handleAdd: i, handleCancel: r, handlePassthrough: s, isPending: c } = m(), { t: n } = d("Employee.Deductions"), t = l();
6
+ const y = () => {
7
+ const { mode: n, handleAdd: i, handleCancel: r, handlePassthrough: s, isPending: c } = m(), { t: o } = d("Employee.Deductions"), t = l();
9
8
  return /* @__PURE__ */ a(u, { children: [
10
- (o === "ADD" || o === "EDIT") && /* @__PURE__ */ e(t.Button, { variant: "secondary", onClick: r, children: n("cancelCta") }),
11
- o === "LIST" && /* @__PURE__ */ e(t.Button, { variant: "secondary", onClick: i, children: n("addDeductionCta") }),
9
+ (n === "ADD" || n === "EDIT") && /* @__PURE__ */ e(t.Button, { variant: "secondary", onClick: r, children: o("cancelCta") }),
10
+ n === "LIST" && /* @__PURE__ */ e(t.Button, { variant: "secondary", onClick: i, children: o("addDeductionCta") }),
12
11
  /* @__PURE__ */ e(
13
12
  t.Button,
14
13
  {
15
- type: o === "LIST" ? "button" : "submit",
14
+ type: n === "LIST" ? "button" : "submit",
16
15
  isLoading: c,
17
- onClick: o === "LIST" ? s : void 0,
18
- children: n("continueCta")
16
+ onClick: n === "LIST" ? s : void 0,
17
+ children: o("continueCta")
19
18
  }
20
19
  )
21
20
  ] });
22
21
  };
23
22
  export {
24
- L as Actions
23
+ y as Actions
25
24
  };
26
25
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Deductions/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { mode, handleAdd, handleCancel, handlePassthrough, isPending } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'EDIT') && (\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" onClick={handleAdd}>\n {t('addDeductionCta')}\n </Components.Button>\n )}\n <Components.Button\n type={mode === 'LIST' ? 'button' : 'submit'}\n isLoading={isPending}\n onClick={mode === 'LIST' ? handlePassthrough : undefined}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","mode","handleAdd","handleCancel","handlePassthrough","isPending","useDeductions","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,mBAAAC,GAAmB,WAAAC,MAAcC,EAAc,GAChF,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAoB;AAEvC,2BACGC,GACG,EAAA,UAAA;AAAA,KAAAV,MAAS,SAASA,MAAS,WAC3B,gBAAAW,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASN,GAC7C,UAAAI,EAAE,WAAW,GAChB;AAAA,IAEDN,MAAS,UACP,gBAAAW,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASP,GAC7C,UAAEK,EAAA,iBAAiB,EACtB,CAAA;AAAA,IAEF,gBAAAK;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAMR,MAAS,SAAS,WAAW;AAAA,QACnC,WAAWI;AAAA,QACX,SAASJ,MAAS,SAASG,IAAoB;AAAA,QAE9C,YAAE,aAAa;AAAA,MAAA;AAAA,IAAA;AAAA,EAClB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/Deductions/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { mode, handleAdd, handleCancel, handlePassthrough, isPending } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {(mode === 'ADD' || mode === 'EDIT') && (\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n )}\n {mode === 'LIST' && (\n <Components.Button variant=\"secondary\" onClick={handleAdd}>\n {t('addDeductionCta')}\n </Components.Button>\n )}\n <Components.Button\n type={mode === 'LIST' ? 'button' : 'submit'}\n isLoading={isPending}\n onClick={mode === 'LIST' ? handlePassthrough : undefined}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","mode","handleAdd","handleCancel","handlePassthrough","isPending","useDeductions","t","useTranslation","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,mBAAAC,GAAmB,WAAAC,MAAcC,EAAc,GAChF,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAoB;AAEvC,2BACGC,GACG,EAAA,UAAA;AAAA,KAAAV,MAAS,SAASA,MAAS,WAC3B,gBAAAW,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASN,GAC7C,UAAAI,EAAE,WAAW,GAChB;AAAA,IAEDN,MAAS,UACP,gBAAAW,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASP,GAC7C,UAAEK,EAAA,iBAAiB,EACtB,CAAA;AAAA,IAEF,gBAAAK;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAMR,MAAS,SAAS,WAAW;AAAA,QACnC,WAAWI;AAAA,QACX,SAASJ,MAAS,SAASG,IAAoB;AAAA,QAE9C,YAAE,aAAa;AAAA,MAAA;AAAA,IAAA;AAAA,EAClB,GACF;AAEJ;"}
@@ -2,14 +2,13 @@ import { jsxs as l, Fragment as m, jsx as t } from "react/jsx-runtime";
2
2
  import { useFormContext as s, useWatch as i } from "react-hook-form";
3
3
  import { useTranslation as p } from "react-i18next";
4
4
  import { useDeductions as b } from "./useDeductions.js";
5
- import "classnames";
6
5
  import { useI18n as f } from "../../../i18n/I18n.js";
7
6
  import { useComponentContext as D } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
7
  import { TextInputField as g } from "../../Common/Fields/TextInputField/TextInputField.js";
9
8
  import { RadioGroupField as a } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
10
9
  import { NumberInputField as u } from "../../Common/Fields/NumberInputField/NumberInputField.js";
11
10
  import { CheckboxField as x } from "../../Common/Fields/CheckboxField/CheckboxField.js";
12
- const R = () => {
11
+ const I = () => {
13
12
  const { mode: n } = b(), { control: r } = s();
14
13
  f("Employee.Deductions");
15
14
  const { t: e } = p("Employee.Deductions"), o = D(), c = i({ control: r, name: "recurring" }), d = i({ control: r, name: "deductAsPercentage" });
@@ -72,6 +71,6 @@ const R = () => {
72
71
  ] });
73
72
  };
74
73
  export {
75
- R as DeductionForm
74
+ I as DeductionForm
76
75
  };
77
76
  //# sourceMappingURL=DeductionForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeductionForm.js","sources":["../../../../src/components/Employee/Deductions/DeductionForm.tsx"],"sourcesContent":["import { useFormContext, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { useDeductions, type DeductionInputs } from './useDeductions'\nimport {\n CheckboxField,\n NumberInputField,\n RadioGroupField,\n TextInputField,\n} from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const DeductionForm = () => {\n const { mode } = useDeductions()\n const { control } = useFormContext<DeductionInputs>()\n useI18n('Employee.Deductions')\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n const watchedRecurring = useWatch({ control, name: 'recurring' })\n const watchedDeductAsPercentage = useWatch({ control, name: 'deductAsPercentage' })\n\n if (mode !== 'ADD' && mode !== 'EDIT') return\n\n return (\n <>\n <Components.Heading as=\"h2\">\n {mode === 'EDIT' ? t('editDeductionTitle') : t('addDeductionTitle')}\n </Components.Heading>\n <Components.Text>{t('addDeuctionDescription')}</Components.Text>\n <TextInputField\n name=\"description\"\n label={t('descriptionLabel')}\n isRequired\n errorMessage={t('validations.description')}\n />\n <RadioGroupField\n name=\"recurring\"\n label={t('frequencyLabel')}\n options={[\n { value: 'true', label: t('frequencyRecurringOption') },\n { value: 'false', label: t('frequencyOneTimeOption') },\n ]}\n />\n <RadioGroupField\n name=\"deductAsPercentage\"\n label={t('deductionTypeLabel')}\n options={[\n { value: 'true', label: t('deductionTypePercentageOption') },\n { value: 'false', label: t('deductionTypeFixedAmountOption') },\n ]}\n />\n <div className=\"deduction-amount-section\">\n <NumberInputField\n name=\"amount\"\n isRequired\n label={t('deductionAmountLabel')}\n format={watchedDeductAsPercentage === 'true' ? 'percent' : 'currency'}\n min={0}\n errorMessage={t('validations.amount')}\n />\n </div>\n {watchedRecurring === 'true' && (\n <NumberInputField\n name=\"annualMaximum\"\n label={t('annualMaxLabel')}\n format=\"currency\"\n min={0}\n />\n )}\n <CheckboxField name=\"courtOrdered\" label={t('courtOrderedLabel')} />\n </>\n )\n}\n"],"names":["DeductionForm","mode","useDeductions","control","useFormContext","useI18n","t","useTranslation","Components","useComponentContext","watchedRecurring","useWatch","watchedDeductAsPercentage","jsxs","Fragment","jsx","TextInputField","RadioGroupField","NumberInputField","CheckboxField"],"mappings":";;;;;;;;;;;AAYO,MAAMA,IAAgB,MAAM;AAC3B,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAc,GACzB,EAAE,SAAAC,EAAQ,IAAIC,EAAgC;AACpD,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAaC,EAAoB,GAEjCC,IAAmBC,EAAS,EAAE,SAAAR,GAAS,MAAM,aAAa,GAC1DS,IAA4BD,EAAS,EAAE,SAAAR,GAAS,MAAM,sBAAsB;AAE9E,MAAA,EAAAF,MAAS,SAASA,MAAS;AAE/B,WAEI,gBAAAY,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAC,EAACP,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAkBF,EAAlBL,MAAS,SAAW,uBAA0B,mBAAN,EAC3C,CAAA;AAAA,wBACCO,EAAW,MAAX,EAAiB,UAAAF,EAAE,wBAAwB,GAAE;AAAA,MAC9C,gBAAAS;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOV,EAAE,kBAAkB;AAAA,UAC3B,YAAU;AAAA,UACV,cAAcA,EAAE,yBAAyB;AAAA,QAAA;AAAA,MAC3C;AAAA,MACA,gBAAAS;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOX,EAAE,gBAAgB;AAAA,UACzB,SAAS;AAAA,YACP,EAAE,OAAO,QAAQ,OAAOA,EAAE,0BAA0B,EAAE;AAAA,YACtD,EAAE,OAAO,SAAS,OAAOA,EAAE,wBAAwB,EAAE;AAAA,UAAA;AAAA,QACvD;AAAA,MACF;AAAA,MACA,gBAAAS;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOX,EAAE,oBAAoB;AAAA,UAC7B,SAAS;AAAA,YACP,EAAE,OAAO,QAAQ,OAAOA,EAAE,+BAA+B,EAAE;AAAA,YAC3D,EAAE,OAAO,SAAS,OAAOA,EAAE,gCAAgC,EAAE;AAAA,UAAA;AAAA,QAC/D;AAAA,MACF;AAAA,MACA,gBAAAS,EAAC,OAAI,EAAA,WAAU,4BACb,UAAA,gBAAAA;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAOZ,EAAE,sBAAsB;AAAA,UAC/B,QAAQM,MAA8B,SAAS,YAAY;AAAA,UAC3D,KAAK;AAAA,UACL,cAAcN,EAAE,oBAAoB;AAAA,QAAA;AAAA,MAAA,GAExC;AAAA,MACCI,MAAqB,UACpB,gBAAAK;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOZ,EAAE,gBAAgB;AAAA,UACzB,QAAO;AAAA,UACP,KAAK;AAAA,QAAA;AAAA,MACP;AAAA,wBAEDa,GAAc,EAAA,MAAK,gBAAe,OAAOb,EAAE,mBAAmB,EAAG,CAAA;AAAA,IAAA,GACpE;AAEJ;"}
1
+ {"version":3,"file":"DeductionForm.js","sources":["../../../../src/components/Employee/Deductions/DeductionForm.tsx"],"sourcesContent":["import { useFormContext, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { useDeductions, type DeductionInputs } from './useDeductions'\nimport {\n CheckboxField,\n NumberInputField,\n RadioGroupField,\n TextInputField,\n} from '@/components/Common'\nimport { useI18n } from '@/i18n'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const DeductionForm = () => {\n const { mode } = useDeductions()\n const { control } = useFormContext<DeductionInputs>()\n useI18n('Employee.Deductions')\n const { t } = useTranslation('Employee.Deductions')\n const Components = useComponentContext()\n\n const watchedRecurring = useWatch({ control, name: 'recurring' })\n const watchedDeductAsPercentage = useWatch({ control, name: 'deductAsPercentage' })\n\n if (mode !== 'ADD' && mode !== 'EDIT') return\n\n return (\n <>\n <Components.Heading as=\"h2\">\n {mode === 'EDIT' ? t('editDeductionTitle') : t('addDeductionTitle')}\n </Components.Heading>\n <Components.Text>{t('addDeuctionDescription')}</Components.Text>\n <TextInputField\n name=\"description\"\n label={t('descriptionLabel')}\n isRequired\n errorMessage={t('validations.description')}\n />\n <RadioGroupField\n name=\"recurring\"\n label={t('frequencyLabel')}\n options={[\n { value: 'true', label: t('frequencyRecurringOption') },\n { value: 'false', label: t('frequencyOneTimeOption') },\n ]}\n />\n <RadioGroupField\n name=\"deductAsPercentage\"\n label={t('deductionTypeLabel')}\n options={[\n { value: 'true', label: t('deductionTypePercentageOption') },\n { value: 'false', label: t('deductionTypeFixedAmountOption') },\n ]}\n />\n <div className=\"deduction-amount-section\">\n <NumberInputField\n name=\"amount\"\n isRequired\n label={t('deductionAmountLabel')}\n format={watchedDeductAsPercentage === 'true' ? 'percent' : 'currency'}\n min={0}\n errorMessage={t('validations.amount')}\n />\n </div>\n {watchedRecurring === 'true' && (\n <NumberInputField\n name=\"annualMaximum\"\n label={t('annualMaxLabel')}\n format=\"currency\"\n min={0}\n />\n )}\n <CheckboxField name=\"courtOrdered\" label={t('courtOrderedLabel')} />\n </>\n )\n}\n"],"names":["DeductionForm","mode","useDeductions","control","useFormContext","useI18n","t","useTranslation","Components","useComponentContext","watchedRecurring","useWatch","watchedD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,OAAO,QAAQ,OAAOA,EAAE,+BAA+B,EAAE;AAAA,YAC3D,EAAE,OAAO,SAAS,OAAOA,EAAE,gCAAgC,EAAE;AAAA,UAAA;AAAA,QAC/D;AAAA,MACF;AAAA,MACA,gBAAAS,EAAC,OAAI,EAAA,WAAU,4BACb,UAAA,gBAAAA;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,YAAU;AAAA,UACV,OAAOZ,EAAE,sBAAsB;AAAA,UAC/B,QAAQM,MAA8B,SAAS,YAAY;AAAA,UAC3D,KAAK;AAAA,UACL,cAAcN,EAAE,oBAAoB;AAAA,QAAA;AAAA,MAAA,GAExC;AAAA,MACCI,MAAqB,UACpB,gBAAAK;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOZ,EAAE,gBAAgB;AAAA,UACzB,QAAO;AAAA,UACP,KAAK;AAAA,QAAA;AAAA,MACP;AAAA,wBAEDa,GAAc,EAAA,MAAK,gBAAe,OAAOb,EAAE,mBAAmB,EAAG,CAAA;AAAA,IAAA,GACpE;AAEJ;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as p } from "react-i18next";
3
3
  import { useDeductions as g } from "./useDeductions.js";
4
- import "classnames";
5
4
  import o from "../../Common/hooks/useNumberFormatter.js";
6
5
  import b from "../../../assets/icons/pencil.svg.js";
7
6
  import C from "../../../assets/icons/trashcan.svg.js";
8
7
  import { HamburgerMenu as h } from "../../Common/HamburgerMenu/HamburgerMenu.js";
9
8
  import { useDataView as y } from "../../Common/DataView/useDataView.js";
10
9
  import { DataView as D } from "../../Common/DataView/DataView.js";
11
- const V = () => {
10
+ const S = () => {
12
11
  const { mode: i, deductions: m, handleDelete: a, handleEdit: u, isPending: c } = g(), { t: r } = p("Employee.Deductions"), s = o("currency"), l = o("percent"), d = m.filter((e) => e.active), { ...f } = y({
13
12
  data: d,
14
13
  columns: [
@@ -54,6 +53,6 @@ const V = () => {
54
53
  return /* @__PURE__ */ t(D, { label: r("deductionsTableLabel"), ...f });
55
54
  };
56
55
  export {
57
- V as DeductionsList
56
+ S as DeductionsList
58
57
  };
59
58
  //# sourceMappingURL=DeductionsList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeductionsList.js","sources":["../../../../src/components/Employee/Deductions/DeductionsList.tsx"],"sourcesContent":["import type React from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { useDataView, DataView } from '@/components/Common'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const DeductionsList: React.FC = () => {\n const { mode, deductions, handleDelete, handleEdit, isPending } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const activeDeductions = deductions.filter(deduction => deduction.active)\n\n const { ...dataViewProps } = useDataView({\n data: activeDeductions,\n columns: [\n { key: 'description', title: t('nameColumn') },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction => {\n const formattedAmount = deduction.deductAsPercentage\n ? formatPercent(Number(deduction.amount))\n : formatCurrency(Number(deduction.amount))\n return deduction.recurring\n ? t('recurringAmount', { value: formattedAmount })\n : formattedAmount\n },\n },\n ],\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPending}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n handleDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n return <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n}\n"],"names":["DeductionsList","mode","deductions","handleDelete","handleEdit","isPending","useDeductions","t","useTranslation","formatCurrency","useNumberFormatter","formatPercent","activeDeductions","deduction","dataViewProps","useDataView","formattedAmount","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;;AASO,MAAMA,IAA2B,MAAM;AAC5C,QAAM,EAAE,MAAAC,GAAM,YAAAC,GAAY,cAAAC,GAAc,YAAAC,GAAY,WAAAC,MAAcC,EAAc,GAC1E,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAgBD,EAAmB,SAAS,GAE5CE,IAAmBV,EAAW,OAAO,CAAAW,MAAaA,EAAU,MAAM,GAElE,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMH;AAAA,IACN,SAAS;AAAA,MACP,EAAE,KAAK,eAAe,OAAOL,EAAE,YAAY,EAAE;AAAA,MAC7C;AAAA,QACE,KAAK;AAAA,QACL,OAAOA,EAAE,iBAAiB;AAAA,QAC1B,QAAQ,CAAaM,MACZA,EAAU,YAAYN,EAAE,eAAe,IAAIA,EAAE,kBAAkB;AAAA,MAE1E;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAOA,EAAE,gBAAgB;AAAA,QACzB,QAAQ,CAAaM,MAAA;AACnB,gBAAMG,IAAkBH,EAAU,qBAC9BF,EAAc,OAAOE,EAAU,MAAM,CAAC,IACtCJ,EAAe,OAAOI,EAAU,MAAM,CAAC;AACpC,iBAAAA,EAAU,YACbN,EAAE,mBAAmB,EAAE,OAAOS,EAAiB,CAAA,IAC/CA;AAAA,QAAA;AAAA,MACN;AAAA,IAEJ;AAAA,IACA,UAAU,CAAaH,MAEnB,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAWb;AAAA,QACX,OAAO;AAAA,UACL;AAAA,YACE,OAAOE,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAH,EAAWS,CAAS;AAAA,YACtB;AAAA,YACA,MAAM,gBAAAI,EAACE,GAAU,EAAA,eAAW,GAAC,CAAA;AAAA,UAC/B;AAAA,UACA;AAAA,YACE,OAAOZ,EAAE,WAAW;AAAA,YACpB,SAAS,MAAM;AACb,cAAAJ,EAAaU,CAAS;AAAA,YACxB;AAAA,YACA,MAAM,gBAAAI,EAACG,GAAY,EAAA,eAAW,GAAC,CAAA;AAAA,UAAA;AAAA,QACjC;AAAA,MACF;AAAA,IACF;AAAA,EAEJ,CACD;AAED,MAAInB,MAAS;AACb,6BAAQoB,GAAS,EAAA,OAAOd,EAAE,sBAAsB,GAAI,GAAGO,GAAe;AACxE;"}
1
+ {"version":3,"file":"DeductionsList.js","sources":["../../../../src/components/Employee/Deductions/DeductionsList.tsx"],"sourcesContent":["import type React from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { useDataView, DataView } from '@/components/Common'\nimport useNumberFormatter from '@/components/Common/hooks/useNumberFormatter'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport TrashCanSvg from '@/assets/icons/trashcan.svg?react'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\n\nexport const DeductionsList: React.FC = () => {\n const { mode, deductions, handleDelete, handleEdit, isPending } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n const formatCurrency = useNumberFormatter('currency')\n const formatPercent = useNumberFormatter('percent')\n\n const activeDeductions = deductions.filter(deduction => deduction.active)\n\n const { ...dataViewProps } = useDataView({\n data: activeDeductions,\n columns: [\n { key: 'description', title: t('nameColumn') },\n {\n key: 'recurring',\n title: t('frequencyColumn'),\n render: deduction => {\n return deduction.recurring ? t('recurringText') : t('nonRecurringText')\n },\n },\n {\n key: 'amount',\n title: t('withheldColumn'),\n render: deduction => {\n const formattedAmount = deduction.deductAsPercentage\n ? formatPercent(Number(deduction.amount))\n : formatCurrency(Number(deduction.amount))\n return deduction.recurring\n ? t('recurringAmount', { value: formattedAmount })\n : formattedAmount\n },\n },\n ],\n itemMenu: deduction => {\n return (\n <HamburgerMenu\n isLoading={isPending}\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEdit(deduction)\n },\n icon: <PencilSvg aria-hidden />,\n },\n {\n label: t('deleteCta'),\n onClick: () => {\n handleDelete(deduction)\n },\n icon: <TrashCanSvg aria-hidden />,\n },\n ]}\n />\n )\n },\n })\n\n if (mode !== 'LIST') return\n return <DataView label={t('deductionsTableLabel')} {...dataViewProps} />\n}\n"],"names":["DeductionsList","mode","deductions","handleDelete","handleEdit","isPending","useDeductions","t","useTranslation","formatCurrency","useNumberFormatter","formatPercent","activeDeductions","deduction","dataViewProps","useDataView","formattedAmount","jsx","HamburgerMenu","PencilSvg","TrashCanSvg","DataView"],"mappings":";;;;;;;;;AASO,MAAMA,IAA2B,MAAM;AAC5C,QAAM,EAAE,MAAAC,GAAM,YAAAC,GAAY,cAAAC,GAAc,YAAAC,GAAY,WAAAC,MAAcC,EAAc,GAC1E,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5CC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAgBD,EAAmB,SAAS,GAE5CE,IAAmBV,EAAW,OAAO,CAAAW,MAAaA,EAAU,MAAM,GAElE,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMH;AAAA,IACN,SAAS;AAAA,MACP,EAAE,KAAK,eAAe,OAAOL,EAAE,YAAY,EAAE;AAAA,MAC7C;AAAA,QACE,KAAK;AAAA,QACL,OAAOA,EAAE,iBAAiB;AAAA,QAC1B,QAAQ,CAAaM,MACZA,EAAU,YAAYN,EAAE,eAAe,IAAIA,EAAE,kBAAkB;AAAA,MAE1E;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAOA,EAAE,gBAAgB;AAAA,QACzB,QAAQ,CAAaM,MAAA;AACnB,gBAAMG,IAAkBH,EAAU,qBAC9BF,EAAc,OAAOE,EAAU,MAAM,CAAC,IACtCJ,EAAe,OAAOI,EAAU,MAAM,CAAC;AACpC,iBAAAA,EAAU,YACbN,EAAE,mBAAmB,EAAE,OAAOS,EAAiB,CAAA,IAC/CA;AAAA,QAAA;AAAA,MACN;AAAA,IAEJ;AAAA,IACA,UAAU,CAAaH,MAEnB,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAWb;AAAA,QACX,OAAO;AAAA,UACL;AAAA,YACE,OAAOE,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAH,EAAWS,CAAS;AAAA,YACtB;AAAA,YACA,MAAM,gBAAAI,EAACE,GAAU,EAAA,eAAW,GAAC,CAAA;AAAA,UAC/B;AAAA,UACA;AAAA,YACE,OAAOZ,EAAE,WAAW;AAAA,YACpB,SAAS,MAAM;AACb,cAAAJ,EAAaU,CAAS;AAAA,YACxB;AAAA,YACA,MAAM,gBAAAI,EAACG,GAAY,EAAA,eAAW,GAAC,CAAA;AAAA,UAAA;AAAA,QACjC;AAAA,MACF;AAAA,IACF;AAAA,EAEJ,CACD;AAED,MAAInB,MAAS;AACb,6BAAQoB,GAAS,EAAA,OAAOd,EAAE,sBAAsB,GAAI,GAAGO,GAAe;AACxE;"}
@@ -1,9 +1,8 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { useTranslation as n } from "react-i18next";
3
3
  import { useDeductions as t } from "./useDeductions.js";
4
- import "classnames";
5
4
  import { RadioGroupField as u } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
6
- const m = () => {
5
+ const l = () => {
7
6
  const { mode: o } = t(), { t: e } = n("Employee.Deductions");
8
7
  if (o === "INITIAL")
9
8
  return /* @__PURE__ */ i(
@@ -20,6 +19,6 @@ const m = () => {
20
19
  );
21
20
  };
22
21
  export {
23
- m as IncludeDeductionsForm
22
+ l as IncludeDeductionsForm
24
23
  };
25
24
  //# sourceMappingURL=IncludeDeductionsForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IncludeDeductionsForm.js","sources":["../../../../src/components/Employee/Deductions/IncludeDeductionsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { RadioGroupField } from '@/components/Common'\n\nexport const IncludeDeductionsForm = () => {\n const { mode } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n if (mode !== 'INITIAL') return\n return (\n <RadioGroupField\n name=\"includeDeductions\"\n label={t('includeDeductionsFormLabel')}\n description={t('includeDeductionsDescription')}\n options={[\n { value: 'Yes', label: t('includeDeductionsYes') },\n { value: 'No', label: t('includeDeductionsNo') },\n ]}\n />\n )\n}\n"],"names":["IncludeDeductionsForm","mode","useDeductions","t","useTranslation","jsx","RadioGroupField"],"mappings":";;;;;AAIO,MAAMA,IAAwB,MAAM;AACnC,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAc,GACzB,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAClD,MAAIH,MAAS;AAEX,WAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOH,EAAE,4BAA4B;AAAA,QACrC,aAAaA,EAAE,8BAA8B;AAAA,QAC7C,SAAS;AAAA,UACP,EAAE,OAAO,OAAO,OAAOA,EAAE,sBAAsB,EAAE;AAAA,UACjD,EAAE,OAAO,MAAM,OAAOA,EAAE,qBAAqB,EAAE;AAAA,QAAA;AAAA,MACjD;AAAA,IACF;AAEJ;"}
1
+ {"version":3,"file":"IncludeDeductionsForm.js","sources":["../../../../src/components/Employee/Deductions/IncludeDeductionsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDeductions } from './useDeductions'\nimport { RadioGroupField } from '@/components/Common'\n\nexport const IncludeDeductionsForm = () => {\n const { mode } = useDeductions()\n const { t } = useTranslation('Employee.Deductions')\n if (mode !== 'INITIAL') return\n return (\n <RadioGroupField\n name=\"includeDeductions\"\n label={t('includeDeductionsFormLabel')}\n description={t('includeDeductionsDescription')}\n options={[\n { value: 'Yes', label: t('includeDeductionsYes') },\n { value: 'No', label: t('includeDeductionsNo') },\n ]}\n />\n )\n}\n"],"names":["IncludeDeductionsForm","mode","useDeductions","t","useTranslation","jsx","RadioGroupField"],"mappings":";;;;AAIO,MAAMA,IAAwB,MAAM;AACnC,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAc,GACzB,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAClD,MAAIH,MAAS;AAEX,WAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOH,EAAE,4BAA4B;AAAA,QACrC,aAAaA,EAAE,8BAA8B;AAAA,QAC7C,SAAS;AAAA,UACP,EAAE,OAAO,OAAO,OAAOA,EAAE,sBAAsB,EAAE;AAAA,UACjD,EAAE,OAAO,MAAM,OAAOA,EAAE,qBAAqB,EAAE;AAAA,QAAA;AAAA,MACjD;AAAA,IACF;AAEJ;"}
@@ -9,9 +9,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
9
9
  import "@tanstack/react-query";
10
10
  import "../../Base/useBase.js";
11
11
  import "../../../shared/constants.js";
12
- import "classnames";
13
12
  import "dompurify";
14
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
15
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
16
16
  const D = r.object({
17
17
  active: r.boolean(),
@@ -1,14 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
3
  import { useDocumentList as s } from "./useDocumentList.js";
4
- import "classnames";
5
4
  import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function C() {
8
- const { t: n } = r("Employee.DocumentSigner"), { handleContinue: t, hasSignedAllForms: i } = s(), e = c();
9
- return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(e.Button, { onClick: t, isLoading: !1, isDisabled: !i, children: n("continueCta") }) });
6
+ function d() {
7
+ const { t: n } = r("Employee.DocumentSigner"), { handleContinue: t, hasSignedAllForms: e } = s(), i = c();
8
+ return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(i.Button, { onClick: t, isLoading: !1, isDisabled: !e, children: n("continueCta") }) });
10
9
  }
11
10
  export {
12
- C as Actions
11
+ d as Actions
13
12
  };
14
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAkB,IAAIC,EAAgB,GACxDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAEH,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAkB,IAAIC,EAAgB,GACxDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAEH,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
@@ -2,22 +2,20 @@ import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
2
  import { useEmployeeFormsListSuspense as L } from "@gusto/embedded-api/react-query/employeeFormsList";
3
3
  import { Head as u } from "./Head.js";
4
4
  import { List as c } from "./List.js";
5
- import { Actions as p } from "./Actions.js";
5
+ import { Actions as l } from "./Actions.js";
6
6
  import { DocumentListProvider as h } from "./useDocumentList.js";
7
7
  import { BaseComponent as F } from "../../../Base/Base.js";
8
8
  import { useBase as S } from "../../../Base/useBase.js";
9
9
  import { useI18n as g } from "../../../../i18n/I18n.js";
10
10
  import { componentEvents as s } from "../../../../shared/constants.js";
11
11
  import { Flex as O } from "../../../Common/Flex/Flex.js";
12
- import "react-i18next";
13
- import "classnames";
14
- function t(e) {
12
+ function n(e) {
15
13
  return /* @__PURE__ */ o(F, { ...e, children: /* @__PURE__ */ o(_, { ...e }) });
16
14
  }
17
- function _({ employeeId: e, className: l, children: n }) {
15
+ function _({ employeeId: e, className: p, children: t }) {
18
16
  g("Employee.DocumentSigner");
19
17
  const { onEvent: i } = S(), { data: d, error: f } = L({ employeeId: e }), m = d.formList, E = m.every((r) => !r.requiresSigning);
20
- return /* @__PURE__ */ o("section", { className: l, children: /* @__PURE__ */ o(
18
+ return /* @__PURE__ */ o("section", { className: p, children: /* @__PURE__ */ o(
21
19
  h,
22
20
  {
23
21
  value: {
@@ -31,18 +29,18 @@ function _({ employeeId: e, className: l, children: n }) {
31
29
  },
32
30
  documentListError: f
33
31
  },
34
- children: n || /* @__PURE__ */ a(O, { flexDirection: "column", children: [
32
+ children: t || /* @__PURE__ */ a(O, { flexDirection: "column", children: [
35
33
  /* @__PURE__ */ o(u, {}),
36
34
  /* @__PURE__ */ o(c, {}),
37
- /* @__PURE__ */ o(p, {})
35
+ /* @__PURE__ */ o(l, {})
38
36
  ] })
39
37
  }
40
38
  ) });
41
39
  }
42
- t.Head = u;
43
- t.List = c;
44
- t.Actions = p;
40
+ n.Head = u;
41
+ n.List = c;
42
+ n.Actions = l;
45
43
  export {
46
- t as DocumentList
44
+ n as DocumentList
47
45
  };
48
46
  //# sourceMappingURL=DocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n\nDocumentList.Head = Head\nDocumentList.List = List\nDocumentList.Actions = Actions\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;;;AAoBO,SAASA,EAAaC,GAAmD;AAE5E,SAAA,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAM,EAAA,GAAGH,GAAO,EACnB,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AAC3B,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAQ,GAEtB,EAAE,MAAAC,GAAM,OAAOC,MAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAgBE,MAAA,CAACA,EAAa,eAAe;AAWzF,SAAA,gBAAAd,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,eAAAH;AAAA,QACA,mBAAAC;AAAA,QACA,gBAVe,MAAM;AAC3B,UAAAN,EAAQS,EAAgB,mBAAmB;AAAA,QAC7C;AAAA,QASQ,yBAfwB,CAACP,MAAe;AAC9C,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM;AAAA,QACzE;AAAA,QAcQ,mBAAAC;AAAA,MACF;AAAA,MAEC,UACCL,KAEC,gBAAAY,EAAAC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAEAvB,EAAa,OAAOqB;AACpBrB,EAAa,OAAOsB;AACpBtB,EAAa,UAAUuB;"}
1
+ {"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n\nDocumentList.Head = Head\nDocumentList.List = List\nDocumentList.Actions = Actions\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;AAoBO,SAASA,EAAaC,GAAmD;AAE5E,SAAA,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAM,EAAA,GAAGH,GAAO,EACnB,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AAC3B,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAQ,GAEtB,EAAE,MAAAC,GAAM,OAAOC,MAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAgBE,MAAA,CAACA,EAAa,eAAe;AAWzF,SAAA,gBAAAd,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,eAAAH;AAAA,QACA,mBAAAC;AAAA,QACA,gBAVe,MAAM;AAC3B,UAAAN,EAAQS,EAAgB,mBAAmB;AAAA,QAC7C;AAAA,QASQ,yBAfwB,CAACP,MAAe;AAC9C,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM;AAAA,QACzE;AAAA,QAcQ,mBAAAC;AAAA,MACF;AAAA,MAEC,UACCL,KAEC,gBAAAY,EAAAC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAEAvB,EAAa,OAAOqB;AACpBrB,EAAa,OAAOsB;AACpBtB,EAAa,UAAUuB;"}
@@ -2,9 +2,8 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as m } from "react-i18next";
3
3
  import { useDocumentList as s } from "./useDocumentList.js";
4
4
  import { Flex as l } from "../../../Common/Flex/Flex.js";
5
- import "classnames";
6
5
  import { DocumentList as u } from "../../../Common/DocumentList/DocumentList.js";
7
- function b() {
6
+ function L() {
8
7
  const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
9
8
  return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
10
9
  u,
@@ -33,6 +32,6 @@ function b() {
33
32
  ) }) });
34
33
  }
35
34
  export {
36
- b as List
35
+ L as List
37
36
  };
38
37
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAgB,GAChF,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACG,gBAAAC,EAAA,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAK,EAAA,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAASS,OAAA;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAC/B;AAAA,MACA,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MACpC;AAAA,MACA,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,KAErC,EACF,CAAA;AAEJ;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAgB,GAChF,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACG,gBAAAC,EAAA,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAK,EAAA,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAASS,OAAA;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAC/B;AAAA,MACA,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MACpC;AAAA,MACA,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,KAErC,EACF,CAAA;AAEJ;"}
@@ -8,9 +8,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
8
  import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
- import "classnames";
12
11
  import "dompurify";
13
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
15
  const [d, a] = t("DocumentListContext");
16
16
  export {
@@ -12,13 +12,11 @@ import { useBase as G } from "../../../Base/useBase.js";
12
12
  import { useI18n as H } from "../../../../i18n/I18n.js";
13
13
  import { componentEvents as s } from "../../../../shared/constants.js";
14
14
  import { Flex as M } from "../../../Common/Flex/Flex.js";
15
- import "react-i18next";
16
- import "classnames";
17
15
  import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
18
- function t(r) {
16
+ function n(r) {
19
17
  return /* @__PURE__ */ o(C, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
20
18
  }
21
- function j({ employeeId: r, formId: d, className: p, children: n }) {
19
+ function j({ employeeId: r, formId: d, className: p, children: t }) {
22
20
  H("Employee.DocumentSigner");
23
21
  const { onEvent: m, baseSubmitHandler: l } = G(), { data: g } = w({ employeeId: r, formId: d }), e = g.form, {
24
22
  data: { formPdf: F }
@@ -50,7 +48,7 @@ function j({ employeeId: r, formId: d, className: p, children: n }) {
50
48
  m(s.EMPLOYEE_SIGN_FORM, v);
51
49
  }
52
50
  });
53
- }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: n || /* @__PURE__ */ x(b, { children: [
51
+ }, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: t || /* @__PURE__ */ x(b, { children: [
54
52
  /* @__PURE__ */ o(a, {}),
55
53
  /* @__PURE__ */ o(f, {}),
56
54
  /* @__PURE__ */ o(u, {}),
@@ -59,11 +57,11 @@ function j({ employeeId: r, formId: d, className: p, children: n }) {
59
57
  }
60
58
  ) });
61
59
  }
62
- t.Head = a;
63
- t.Preview = f;
64
- t.Form = u;
65
- t.Actions = c;
60
+ n.Head = a;
61
+ n.Preview = f;
62
+ n.Form = u;
63
+ n.Actions = c;
66
64
  export {
67
- t as SignatureForm
65
+ n as SignatureForm
68
66
  };
69
67
  //# sourceMappingURL=SignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n\nSignatureForm.Head = Head\nSignatureForm.Preview = Preview\nSignatureForm.Form = FormComponent\nSignatureForm.Actions = Actions\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":";;;;;;;;;;;;;;;;;AAyBO,SAASA,EAAcC,GAAoD;AAE9E,SAAA,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAM,EAAA,GAAGH,GAAO,EACnB,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,MAAAC,EAAK,IAAIC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAQ;AAAA,EAAA,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAA6B;AAyB3F,SAAA,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAAJ;AAAA,QACA,YA3BW,MAAM;AACvB,UAAAR,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QA0BQ,MAAAR;AAAA,QACA,WAAWK;AAAA,MACb;AAAA,MAEA,UAAA,gBAAAlB,EAACsB,GAAoB,EAAA,UA5BN,OAAOX,MAA8B;AAClD,cAAAF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAe,IAAI,MAAMP,EAAS;AAAA,cAC9C,SAAS;AAAA,gBACP,YAAAd;AAAA,gBACA,QAAQU,EAAK;AAAA,gBACb,aAAa;AAAA,kBACX,eAAeU,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,gBAAA;AAAA,cACjB;AAAA,YACF,CACD;AACO,YAAAf,EAAAa,EAAgB,oBAAoBG,CAAc;AAAA,UAAA;AAAA,QAC5D,CACD;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UACCnB,KAGE,gBAAAoB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAK,EAAA;AAAA,0BACLC,GAAQ,EAAA;AAAA,0BACRC,GAAc,EAAA;AAAA,0BACdC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA,EAEJ,CAAA,EACF,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEAjC,EAAc,OAAO8B;AACrB9B,EAAc,UAAU+B;AACxB/B,EAAc,OAAOgC;AACrBhC,EAAc,UAAUiC;"}
1
+ {"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n\nSignatureForm.Head = Head\nSignatureForm.Preview = Preview\nSignatureForm.Form = FormComponent\nSignatureForm.Actions = Actions\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":";;;;;;;;;;;;;;;AAyBO,SAASA,EAAcC,GAAoD;AAE9E,SAAA,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAM,EAAA,GAAGH,GAAO,EACnB,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,MAAAC,EAAK,IAAIC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAQ;AAAA,EAAA,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAA6B;AAyB3F,SAAA,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAAJ;AAAA,QACA,YA3BW,MAAM;AACvB,UAAAR,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QA0BQ,MAAAR;AAAA,QACA,WAAWK;AAAA,MACb;AAAA,MAEA,UAAA,gBAAAlB,EAACsB,GAAoB,EAAA,UA5BN,OAAOX,MAA8B;AAClD,cAAAF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAe,IAAI,MAAMP,EAAS;AAAA,cAC9C,SAAS;AAAA,gBACP,YAAAd;AAAA,gBACA,QAAQU,EAAK;AAAA,gBACb,aAAa;AAAA,kBACX,eAAeU,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,gBAAA;AAAA,cACjB;AAAA,YACF,CACD;AACO,YAAAf,EAAAa,EAAgB,oBAAoBG,CAAc;AAAA,UAAA;AAAA,QAC5D,CACD;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UACCnB,KAGE,gBAAAoB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAK,EAAA;AAAA,0BACLC,GAAQ,EAAA;AAAA,0BACRC,GAAc,EAAA;AAAA,0BACdC,GAAQ,CAAA,CAAA;AAAA,MAAA,EACX,CAAA,EAEJ,CAAA,EACF,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEAjC,EAAc,OAAO8B;AACrB9B,EAAc,UAAU+B;AACxB/B,EAAc,OAAOgC;AACrBhC,EAAc,UAAUiC;"}
@@ -8,9 +8,9 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
8
  import "@tanstack/react-query";
9
9
  import "../../../Base/useBase.js";
10
10
  import "../../../../shared/constants.js";
11
- import "classnames";
12
11
  import "dompurify";
13
12
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
13
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
15
15
  const [c, d] = o("SignatureFormContext");
16
16
  export {
@@ -1,14 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as r } from "react-i18next";
3
3
  import { useEmployeeList as m } from "./useEmployeeList.js";
4
- import "classnames";
5
4
  import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
6
- import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function C() {
8
- const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = p();
5
+ import { useComponentContext as l } from "../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ function y() {
7
+ const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = l();
9
8
  return e.length === 0 ? null : /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { onClick: n, isLoading: !1, children: t("continueCta") }) });
10
9
  }
11
10
  export {
12
- C as Actions
11
+ y as Actions
13
12
  };
14
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,YAAAC,GAAY,WAAAC,EAAU,IAAIC,EAAgB,GAC5CC,IAAaC,EAAoB;AAEnC,SAAAH,EAAU,WAAW,IAChB,OAIN,gBAAAI,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,YAAAC,GAAY,WAAAC,EAAU,IAAIC,EAAgB,GAC5CC,IAAaC,EAAoB;AAEnC,SAAAH,EAAU,WAAW,IAChB,OAIN,gBAAAI,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}