@gusto/embedded-react-sdk 0.10.6 → 0.10.7-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/Common/SignatureForm/SignatureFormActions.js +7 -8
  3. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  4. package/dist/components/Common/SignatureForm/SignatureFormFields.js +4 -5
  5. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  6. package/dist/components/Common/TaxInputs/TaxInputs.d.ts +5 -1
  7. package/dist/components/Common/TaxInputs/TaxInputs.js +64 -56
  8. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  9. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  10. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  12. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  14. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  15. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  16. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  17. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  18. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  19. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  20. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  21. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  22. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  23. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  24. package/dist/components/Company/Industry/Actions.js +5 -6
  25. package/dist/components/Company/Industry/Actions.js.map +1 -1
  26. package/dist/components/Company/Industry/Edit.js +10 -11
  27. package/dist/components/Company/Industry/Edit.js.map +1 -1
  28. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  29. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  30. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  31. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  32. package/dist/components/Company/Locations/LocationsList/List.js +2 -3
  33. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  34. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -11
  35. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  36. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  37. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  38. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +65 -59
  39. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  40. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  41. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  42. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  43. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  44. package/dist/components/Contractor/Address/Form.js +4 -4
  45. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
  46. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  47. package/dist/components/Employee/Compensation/Actions.js +1 -1
  48. package/dist/components/Employee/Compensation/List.js +5 -6
  49. package/dist/components/Employee/Compensation/List.js.map +1 -1
  50. package/dist/components/Employee/Deductions/Actions.js +8 -9
  51. package/dist/components/Employee/Deductions/Actions.js.map +1 -1
  52. package/dist/components/Employee/Deductions/DeductionForm.js +2 -3
  53. package/dist/components/Employee/Deductions/DeductionForm.js.map +1 -1
  54. package/dist/components/Employee/Deductions/DeductionsList.js +2 -3
  55. package/dist/components/Employee/Deductions/DeductionsList.js.map +1 -1
  56. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +2 -3
  57. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +1 -1
  58. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
  59. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  60. package/dist/components/Employee/EmployeeList/Actions.js +4 -5
  61. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  62. package/dist/components/Employee/EmployeeList/List.js +12 -12
  63. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  64. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  65. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  66. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  67. package/dist/components/Employee/PaymentMethod/Split.js +1 -1
  68. package/dist/components/Employee/Profile/Actions.js +6 -7
  69. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  70. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
  71. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  72. package/dist/components/Employee/Taxes/Actions.js +7 -8
  73. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  74. package/dist/components/Employee/Taxes/FederalForm.js +4 -5
  75. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  76. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  77. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  78. package/dist/i18n/en/Company.StateTaxes.json.js +2 -1
  79. package/dist/i18n/en/Company.StateTaxes.json.js.map +1 -1
  80. package/dist/types/i18next.d.ts +1 -0
  81. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"StateTaxesForm.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTaxRequirementsUpdateStateMutation } from '@gusto/embedded-api/react-query/taxRequirementsUpdateState'\nimport { useTaxRequirementsGetSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGet'\nimport { z } from 'zod'\nimport { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Head } from './Head'\nimport { StateTaxesFormProvider } from './context'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\ninterface StateTaxesFormProps extends CommonComponentInterface {\n companyId: string\n state: string\n}\n\nexport function StateTaxesForm(props: StateTaxesFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, state, className, children }: StateTaxesFormProps) {\n useI18n('Company.StateTaxes')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { data } = useTaxRequirementsGetSuspense({ companyUuid: companyId, state })\n const stateTaxRequirements = data.taxRequirementsState!\n\n const { mutateAsync: updateStateTax, isPending: isPendingUpdate } =\n useTaxRequirementsUpdateStateMutation()\n\n // Schema and default value generation\n const { dynamicSchema, defaultValues } = useMemo(() => {\n const schemaShape: Record<string, z.ZodObject<Record<string, z.ZodTypeAny>>> = {}\n const values: Partial<Record<string, Record<string, string | boolean>>> = {}\n\n //Looping through each requirement set\n stateTaxRequirements.requirementSets?.forEach(requirementSet => {\n if (!requirementSet.key) return\n\n const requirementSetKey = requirementSet.key\n const requirementShape: Record<string, z.ZodTypeAny> = {}\n const requirementValues: Record<string, string | boolean> = {}\n\n requirementSet.requirements?.forEach(requirement => {\n if (!requirement.key) return\n\n const requirementKey = requirement.key\n\n // --- Default Value Logic ---\n requirementValues[requirementKey] = requirement.value ?? ''\n\n // --- Schema Logic ---\n // Start with a basic string schema\n let fieldSchema: z.ZodTypeAny = z.string().min(1)\n\n const validation = requirement.metadata?.validation\n // Not all requirements have validation\n if (validation) {\n if (requirement.metadata?.type === 'tax_rate') {\n if (validation.type === 'min_max') {\n const min = parseFloat(validation.min as string)\n const max = parseFloat(validation.max as string)\n\n if (!isNaN(min) && !isNaN(max)) {\n fieldSchema = z.preprocess(\n val => Number(val),\n z\n .number()\n .min(min, t('validations.minValue', { min }))\n .max(max, t('validations.maxValue', { max }))\n .transform(num => String(num)),\n )\n }\n } else {\n //Type is one_of\n const oneOfValues = validation.rates as string[]\n fieldSchema = z\n .string()\n .min(1)\n .refine(val => oneOfValues.includes(val), {\n message: t('validations.oneOf', { values: oneOfValues.join(', ') }),\n })\n }\n }\n }\n if (requirement.metadata?.type === 'radio') {\n fieldSchema = z.boolean()\n }\n requirementShape[requirementKey] = fieldSchema\n // --- End Schema Logic ---\n })\n\n if (Object.keys(requirementShape).length > 0) {\n schemaShape[requirementSetKey] = z.object(requirementShape)\n values[requirementSetKey] = requirementValues\n }\n })\n\n const finalSchema = z.object(schemaShape)\n\n // Return both the schema and the default values\n return {\n dynamicSchema: finalSchema,\n defaultValues: values as z.infer<typeof finalSchema>,\n }\n }, [stateTaxRequirements, t])\n\n // Infer the type from the schema\n type InferredFormInputs = z.infer<typeof dynamicSchema>\n\n const { control, ...methods } = useForm<InferredFormInputs>({\n resolver: zodResolver(dynamicSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InferredFormInputs) => {\n await baseSubmitHandler(formData, async payload => {\n const requirementSets = stateTaxRequirements.requirementSets\n ?.filter(rs => rs.key && payload[rs.key])\n .map(requirementSet => {\n const requirementSetKey = requirementSet.key as string\n const payloadSet = payload[requirementSetKey] as Record<string, unknown>\n return {\n state: requirementSet.state,\n key: requirementSetKey,\n effectiveFrom: requirementSet.effectiveFrom,\n requirements: Object.entries(payloadSet).map(([key, value]) => ({\n key,\n value: String(value),\n })),\n }\n })\n await updateStateTax({\n request: {\n companyUuid: companyId,\n requestBody: { requirementSets },\n state,\n },\n })\n onEvent(componentEvents.COMPANY_STATE_TAX_UPDATED)\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <StateTaxesFormProvider\n value={{ stateTaxRequirements, isPending: isPendingUpdate, state, handleCancel }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </StateTaxesFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n\nStateTaxesForm.Head = Head\nStateTaxesForm.Form = Form\nStateTaxesForm.Actions = Actions\n"],"names":["StateTaxesForm","props","jsx","BaseComponent","Root","companyId","state","className","children","useI18n","onEvent","baseSubmitHandler","useBase","t","useTranslation","data","useTaxRequirementsGetSuspense","stateTaxRequirements","updateStateTax","isPendingUpdate","useTaxRequirementsUpdateStateMutation","dynamicSchema","defaultValues","useMemo","schemaShape","values","requirementSet","requirementSetKey","requirementShape","requirementValues","requirement","requirementKey","fieldSchema","z","validation","min","max","val","num","oneOfValues","control","methods","useForm","zodResolver","onSubmit","formData","payload","requirementSets","rs","payloadSet","key","value","componentEvents","handleCancel","FormProvider","HtmlForm","StateTaxesFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;;;AAwBO,SAASA,EAAeC,GAAqD;AAEhF,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AAEA,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AU,EAAE,IAAI,CAAC,CAACC,GAAKC,CAAK,OAAO;AAAA,YAC9D,KAAAD;AAAA,YACA,OAAO,OAAOC,CAAK;AAAA,UAAA,EACnB;AAAA,QACJ;AAAA,MAAA,CACD;AACH,YAAMjC,EAAe;AAAA,QACnB,SAAS;AAAA,UACP,aAAab;AAAA,UACb,aAAa,EAAE,iBAAA0C,EAAgB;AAAA,UAC/B,OAAAzC;AAAA,QAAA;AAAA,MACF,CACD,GACDI,EAAQ0C,EAAgB,yBAAyB;AAAA,IAAA,CAClD;AAAA,EACH,GAEMC,IAAe,MAAM;AACzB,IAAA3C,EAAQ0C,EAAgB,MAAM;AAAA,EAChC;AAEA,SACG,gBAAAlD,EAAA,WAAA,EAAQ,WAAAK,GACP,UAAA,gBAAAL,EAACoD,KAAc,GAAGb,GAAS,SAAAD,GACzB,UAAA,gBAAAtC,EAACqD,GAAS,EAAA,UAAUd,EAAQ,aAAaG,CAAQ,GAC/C,UAAA,gBAAA1C;AAAA,IAACsD;AAAA,IAAA;AAAA,MACC,OAAO,EAAE,sBAAAvC,GAAsB,WAAWE,GAAiB,OAAAb,GAAO,cAAA+C,EAAa;AAAA,MAE/E,UAAA,gBAAAnD,EAACuD,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAjD,KAIG,gBAAAkD,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAzD,EAAC0D,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EAAA,CACX,EAEJ,CAAA;AAAA,IAAA;AAAA,EAAA,EAEJ,CAAA,EACF,CAAA,GACF;AAEJ;AAEA9D,EAAe,OAAO4D;AACtB5D,EAAe,OAAO6D;AACtB7D,EAAe,UAAU8D;"}
1
+ {"version":3,"file":"StateTaxesForm.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useTaxRequirementsUpdateStateMutation } from '@gusto/embedded-api/react-query/taxRequirementsUpdateState'\nimport { useTaxRequirementsGetSuspense } from '@gusto/embedded-api/react-query/taxRequirementsGet'\nimport { z } from 'zod'\nimport { useMemo } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Head } from './Head'\nimport { StateTaxesFormProvider } from './context'\nimport { Form } from './Form'\nimport { Actions } from './Actions'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { componentEvents } from '@/shared/constants'\nimport { useBase } from '@/components/Base'\n\ninterface StateTaxesFormProps extends CommonComponentInterface {\n companyId: string\n state: string\n}\n\nexport function StateTaxesForm(props: StateTaxesFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, state, className, children }: StateTaxesFormProps) {\n useI18n('Company.StateTaxes')\n const { onEvent, baseSubmitHandler } = useBase()\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { data } = useTaxRequirementsGetSuspense({ companyUuid: companyId, state })\n const stateTaxRequirements = data.taxRequirementsState!\n\n const { mutateAsync: updateStateTax, isPending: isPendingUpdate } =\n useTaxRequirementsUpdateStateMutation()\n\n // Schema and default value generation\n const { dynamicSchema, defaultValues } = useMemo(() => {\n const schemaShape: Record<string, z.ZodObject<Record<string, z.ZodTypeAny>>> = {}\n const values: Partial<Record<string, Record<string, string | boolean | number | undefined>>> =\n {}\n\n //Looping through each requirement set\n stateTaxRequirements.requirementSets?.forEach(requirementSet => {\n if (!requirementSet.key) return\n\n const requirementSetKey = requirementSet.key\n const requirementShape: Record<string, z.ZodTypeAny> = {}\n const requirementValues: Record<string, string | boolean | number | undefined> = {}\n\n requirementSet.requirements?.forEach(requirement => {\n if (!requirement.key) return\n\n const requirementKey = requirement.key\n\n // --- Default Value Logic ---\n requirementValues[requirementKey] =\n requirement.metadata?.type === 'radio'\n ? (requirement.value ?? undefined)\n : requirement.value\n ? String(requirement.value)\n : ''\n\n // --- Schema Logic ---\n // Start with a basic string schema\n let fieldSchema: z.ZodTypeAny = z\n .string({\n required_error: t('validations.required'),\n })\n .min(1, t('validations.required'))\n\n const validation = requirement.metadata?.validation\n // Not all requirements have validation\n if (validation) {\n if (requirement.metadata?.type === 'tax_rate') {\n if (validation.type === 'min_max') {\n const min = parseFloat(validation.min as string)\n const max = parseFloat(validation.max as string)\n\n if (!isNaN(min) && !isNaN(max)) {\n fieldSchema = z.preprocess(\n val => Number(val),\n z\n .number()\n .min(min, t('validations.minValue', { min }))\n .max(max, t('validations.maxValue', { max }))\n .transform(num => String(num)),\n )\n }\n } else {\n //Type is one_of\n const oneOfValues = validation.rates as string[]\n fieldSchema = z\n .string({\n required_error: t('validations.required'),\n })\n .min(1, t('validations.required'))\n .refine(val => oneOfValues.includes(val), {\n message: t('validations.oneOf', { values: oneOfValues.join(', ') }),\n })\n }\n }\n }\n if (requirement.metadata?.type === 'radio') {\n fieldSchema = z.boolean({\n required_error: t('validations.required'),\n })\n }\n requirementShape[requirementKey] = fieldSchema\n // --- End Schema Logic ---\n })\n\n if (Object.keys(requirementShape).length > 0) {\n schemaShape[requirementSetKey] = z.object(requirementShape)\n values[requirementSetKey] = requirementValues\n }\n })\n\n const finalSchema = z.object(schemaShape)\n\n // Return both the schema and the default values\n return {\n dynamicSchema: finalSchema,\n defaultValues: values as z.infer<typeof finalSchema>,\n }\n }, [stateTaxRequirements, t])\n\n // Infer the type from the schema\n type InferredFormInputs = z.infer<typeof dynamicSchema>\n\n const { control, ...methods } = useForm<InferredFormInputs>({\n resolver: zodResolver(dynamicSchema),\n defaultValues,\n })\n\n const onSubmit = async (formData: InferredFormInputs) => {\n await baseSubmitHandler(formData, async payload => {\n const requirementSets = stateTaxRequirements.requirementSets\n ?.filter(rs => rs.key && payload[rs.key])\n .map(requirementSet => {\n const requirementSetKey = requirementSet.key as string\n const payloadSet = payload[requirementSetKey] as Record<string, unknown>\n return {\n state: requirementSet.state,\n key: requirementSetKey,\n effectiveFrom: requirementSet.effectiveFrom,\n requirements: Object.entries(payloadSet).map(([key, value]) => ({\n key,\n value: String(value),\n })),\n }\n })\n await updateStateTax({\n request: {\n companyUuid: companyId,\n requestBody: { requirementSets },\n state,\n },\n })\n onEvent(componentEvents.COMPANY_STATE_TAX_UPDATED)\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <StateTaxesFormProvider\n value={{ stateTaxRequirements, isPending: isPendingUpdate, state, handleCancel }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </StateTaxesFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n\nStateTaxesForm.Head = Head\nStateTaxesForm.Form = Form\nStateTaxesForm.Actions = Actions\n"],"names":["StateTaxesForm","props","jsx","BaseComponent","Root","companyId","state","className","children","useI18n","onEvent","baseSubmitHandler","useBase","t","useTranslation","data","useTaxRequirementsGetSuspense","stateTaxRequirements","updateStateTax","isPendingUpdate","useTaxRequirementsUpdateStateMutation","dynamicSchema","defaultValues","useMemo","schemaShape","values","requirementSet","requirementSetKey","requirementShape","requirementValues","requirement","requirementKey","fieldSchema","z","validation","min","max","val","num","oneOfValues","control","methods","useForm","zodResolver","onSubmit","formData","payload","requirementSets","rs","payloadSet","key","value","componentEvents","handleCancel","FormProvider","HtmlForm","StateTaxesFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;;;;AAwBO,SAASA,EAAeC,GAAqD;AAEhF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AC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAzD,EAAC0D,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EAAA,CACX,EAEJ,CAAA;AAAA,IAAA;AAAA,EAAA,EAEJ,CAAA,EACF,CAAA,GACF;AAEJ;AAEA9D,EAAe,OAAO4D;AACtB5D,EAAe,OAAO6D;AACtB7D,EAAe,UAAU8D;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as i } from "react-i18next";
3
3
  import { useStateTaxesList as e } from "./context.js";
4
- import "../../../../shared/constants.js";
5
- import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
- import { useComponentContext as s } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function l() {
8
- const { t: o } = i("Company.StateTaxes"), n = s(), { handleContinue: r } = e();
9
- return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
4
+ import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
5
+ import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
6
+ function f() {
7
+ const { t: o } = i("Company.StateTaxes"), n = m(), { handleContinue: r } = e();
8
+ return /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(n.Button, { variant: "primary", onClick: r, children: o("list.continueCta") }) });
10
9
  }
11
10
  export {
12
- l as Actions
11
+ f as Actions
13
12
  };
14
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAoB,GACjC,EAAE,gBAAAC,EAAe,IAAIC,EAAkB;AAC7C,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAEJ,EAAA,kBAAkB,EACvB,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes')\n const Components = useComponentContext()\n const { handleContinue } = useStateTaxesList()\n return (\n <ActionsLayout>\n <Components.Button variant=\"primary\" onClick={handleContinue}>\n {t('list.continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","Components","useComponentContext","handleContinue","useStateTaxesList","jsx","ActionsLayout"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,oBAAoB,GAC3CC,IAAaC,EAAoB,GACjC,EAAE,gBAAAC,EAAe,IAAIC,EAAkB;AAC7C,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAJ,EAAW,QAAX,EAAkB,SAAQ,WAAU,SAASE,GAC3C,UAAEJ,EAAA,kBAAkB,EACvB,CAAA,GACF;AAEJ;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as s, Fragment as p } from "react/jsx-runtime";
2
2
  import { useTranslation as o } from "react-i18next";
3
3
  import { useStateTaxesList as l } from "./context.js";
4
- import "../../../../shared/constants.js";
5
4
  import { EmptyData as c } from "../../../Common/EmptyData/EmptyData.js";
6
5
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
6
  import { useDataView as d } from "../../../Common/DataView/useDataView.js";
8
7
  import { DataView as C } from "../../../Common/DataView/DataView.js";
9
- const k = () => {
10
- const { stateTaxRequirements: r, handleChange: n } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
11
- data: r,
8
+ const S = () => {
9
+ const { stateTaxRequirements: n, handleChange: r } = l(), a = u(), { t } = o("Company.StateTaxes", { keyPrefix: "list" }), { t: i } = o("common", { keyPrefix: "statesHash" }), { ...m } = d({
10
+ data: n,
12
11
  columns: [
13
12
  {
14
13
  key: "state",
@@ -26,7 +25,7 @@ const k = () => {
26
25
  {
27
26
  variant: "secondary",
28
27
  onClick: () => {
29
- n(e.state);
28
+ r(e.state);
30
29
  },
31
30
  children: e.setupComplete ? t("editStateTaxCta") : t("continueStateTaxSetupCta")
32
31
  }
@@ -36,6 +35,6 @@ const k = () => {
36
35
  return /* @__PURE__ */ s(C, { label: t("requirementsListLabel"), ...m });
37
36
  };
38
37
  export {
39
- k as List
38
+ S as List
40
39
  };
41
40
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAa,IAAIC,EAAkB,GAC3DC,IAAaC,EAAoB,GAEjC,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAeS,MACb,gBAAAC,EAAA,QAAA,EAAM,UAAWJ,EAAAG,EAAY,KAAqC,GAAE;AAAA,MAEhF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAeA,6BAGjB,UAAC,gBAAAC,EAAAP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,EACvE,CAAA,GACF;AAAA,MAEJ;AAAA,IAEJ;AAAA,IACA,UAAU,CAAeA,MAErB,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAaQ,EAAY,KAAK;AAAA,QAChC;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAClF;AAAA,IAIJ,YAAY,MACV,gBAAAC,EAACC,GAAU,EAAA,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAG,CAAA;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAS,EAAA,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesList } from './context'\nimport { DataView, EmptyData, useDataView } from '@/components/Common'\nimport type { STATES_ABBR } from '@/shared/constants'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const List = () => {\n const { stateTaxRequirements, handleChange } = useStateTaxesList()\n const Components = useComponentContext()\n\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'list' })\n const { t: statesHash } = useTranslation('common', { keyPrefix: 'statesHash' })\n\n const { ...dataViewProps } = useDataView({\n data: stateTaxRequirements,\n columns: [\n {\n key: 'state',\n title: t('requirementsListCol1'),\n render: requirement => {\n return <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span>\n },\n },\n {\n key: 'status',\n title: t('requirementsListCol2'),\n render: requirement => {\n return (\n <>\n <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}>\n {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')}\n </Components.Badge>\n </>\n )\n },\n },\n ],\n itemMenu: requirement => {\n return (\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleChange(requirement.state)\n }}\n >\n {requirement.setupComplete ? t('editStateTaxCta') : t('continueStateTaxSetupCta')}\n </Components.Button>\n )\n },\n\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n })\n return <DataView label={t('requirementsListLabel')} {...dataViewProps} />\n}\n"],"names":["List","stateTaxRequirements","handleChange","useStateTaxesList","Components","useComponentContext","useTranslation","statesHash","dataViewProps","useDataView","requirement","jsx","EmptyData","DataView"],"mappings":";;;;;;;AAMO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,sBAAAC,GAAsB,cAAAC,EAAa,IAAIC,EAAkB,GAC3DC,IAAaC,EAAoB,GAEjC,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,GAAGC,MAAeD,EAAe,UAAU,EAAE,WAAW,cAAc,GAExE,EAAE,GAAGE,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMR;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAeS,MACb,gBAAAC,EAAA,QAAA,EAAM,UAAWJ,EAAAG,EAAY,KAAqC,GAAE;AAAA,MAEhF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,sBAAsB;AAAA,QAC/B,QAAQ,CAAeA,6BAGjB,UAAC,gBAAAC,EAAAP,EAAW,OAAX,EAAiB,QAAQM,EAAY,gBAAgB,YAAY,WAC/D,UAAAA,EAAY,gBAAgB,EAAE,eAAe,IAAI,EAAE,iBAAiB,EACvE,CAAA,GACF;AAAA,MAEJ;AAAA,IAEJ;AAAA,IACA,UAAU,CAAeA,MAErB,gBAAAC;AAAA,MAACP,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,SAAS,MAAM;AACb,UAAAF,EAAaQ,EAAY,KAAK;AAAA,QAChC;AAAA,QAEC,YAAY,gBAAgB,EAAE,iBAAiB,IAAI,EAAE,0BAA0B;AAAA,MAAA;AAAA,IAClF;AAAA,IAIJ,YAAY,MACV,gBAAAC,EAACC,GAAU,EAAA,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAG,CAAA;AAAA,EAAA,CAEpF;AACD,2BAAQC,GAAS,EAAA,OAAO,EAAE,uBAAuB,GAAI,GAAGL,GAAe;AACzE;"}
@@ -1,12 +1,12 @@
1
1
  import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
2
  import { useTranslation as i } from "react-i18next";
3
- import { STATES_ABBR as o } from "../../../shared/constants.js";
4
- import { Grid as l } from "../../Common/Grid/Grid.js";
3
+ import { Grid as o } from "../../Common/Grid/Grid.js";
4
+ import { STATES_ABBR as l } from "../../../shared/constants.js";
5
5
  import { TextInputField as t } from "../../Common/Fields/TextInputField/TextInputField.js";
6
6
  import { SelectField as m } from "../../Common/Fields/SelectField/SelectField.js";
7
7
  function g() {
8
8
  const { t: e } = i("Contractor.Address");
9
- return /* @__PURE__ */ s(l, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
9
+ return /* @__PURE__ */ s(o, { gridTemplateColumns: { base: "1fr", small: ["1fr", "1fr"] }, gap: 20, children: [
10
10
  /* @__PURE__ */ r(
11
11
  t,
12
12
  {
@@ -30,7 +30,7 @@ function g() {
30
30
  m,
31
31
  {
32
32
  name: "state",
33
- options: o.map((a) => ({
33
+ options: l.map((a) => ({
34
34
  label: e(`statesHash.${a}`, { ns: "common", defaultValue: a }),
35
35
  value: a
36
36
  })),
@@ -1,9 +1,8 @@
1
1
  import { jsxs as n, Fragment as o, jsx as r } from "react/jsx-runtime";
2
2
  import { useTranslation as t } from "react-i18next";
3
- import "../../../shared/constants.js";
4
3
  import { TextInputField as a } from "../../Common/Fields/TextInputField/TextInputField.js";
5
4
  import { RadioGroupField as i } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
6
- function p({ bankAccount: u }) {
5
+ function b({ bankAccount: u }) {
7
6
  const { t: e } = t("Contractor.PaymentMethod", { keyPrefix: "bankAccountForm" });
8
7
  return /* @__PURE__ */ n(o, { children: [
9
8
  /* @__PURE__ */ r(
@@ -48,6 +47,6 @@ function p({ bankAccount: u }) {
48
47
  ] });
49
48
  }
50
49
  export {
51
- p as BankAccountForm
50
+ b as BankAccountForm
52
51
  };
53
52
  //# sourceMappingURL=BankAccountForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BankAccountForm.js","sources":["../../../../src/components/Contractor/PaymentMethod/BankAccountForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { BankAccountFormProps } from './types'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\n\nexport function BankAccountForm({ bankAccount }: BankAccountFormProps) {\n const { t } = useTranslation('Contractor.PaymentMethod', { keyPrefix: 'bankAccountForm' })\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","bankAccount","t","useTranslation","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":";;;;;AAIgB,SAAAA,EAAgB,EAAE,aAAAC,KAAqC;AAC/D,QAAA,EAAE,GAAAC,MAAMC,EAAe,4BAA4B,EAAE,WAAW,mBAAmB;AAEzF,SAEI,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOL,EAAE,WAAW;AAAA,QACpB,cAAcA,EAAE,yBAAyB;AAAA,MAAA;AAAA,IAC3C;AAAA,IAEA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,YAAU;AAAA,QACV,aAAaA,EAAE,0BAA0B;AAAA,QACzC,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAC7C;AAAA,IAEA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,cAAcA,EAAE,2BAA2B;AAAA,QAC3C,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEA,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAON,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP,EAAE,OAAO,YAAY,OAAOA,EAAE,qBAAqB,EAAE;AAAA,UACrD,EAAE,OAAO,WAAW,OAAOA,EAAE,oBAAoB,EAAE;AAAA,QAAA;AAAA,MACrD;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"BankAccountForm.js","sources":["../../../../src/components/Contractor/PaymentMethod/BankAccountForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { BankAccountFormProps } from './types'\nimport { RadioGroupField, TextInputField } from '@/components/Common'\n\nexport function BankAccountForm({ bankAccount }: BankAccountFormProps) {\n const { t } = useTranslation('Contractor.PaymentMethod', { keyPrefix: 'bankAccountForm' })\n\n return (\n <>\n <TextInputField\n name=\"name\"\n isRequired\n label={t('nameLabel')}\n errorMessage={t('validations.accountName')}\n />\n\n <TextInputField\n name=\"routingNumber\"\n label={t('routingNumberLabel')}\n isRequired\n description={t('routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n\n <TextInputField\n name=\"accountNumber\"\n label={t('accountNumberLabel')}\n errorMessage={t('validations.accountNumber')}\n isRequired\n />\n\n <RadioGroupField\n name=\"accountType\"\n label={t('accountTypeLabel')}\n options={[\n { value: 'Checking', label: t('accountTypeChecking') },\n { value: 'Savings', label: t('accountTypeSavings') },\n ]}\n />\n </>\n )\n}\n"],"names":["BankAccountForm","bankAccount","t","useTranslation","jsxs","Fragment","jsx","TextInputField","RadioGroupField"],"mappings":";;;;AAIgB,SAAAA,EAAgB,EAAE,aAAAC,KAAqC;AAC/D,QAAA,EAAE,GAAAC,MAAMC,EAAe,4BAA4B,EAAE,WAAW,mBAAmB;AAEzF,SAEI,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOL,EAAE,WAAW;AAAA,QACpB,cAAcA,EAAE,yBAAyB;AAAA,MAAA;AAAA,IAC3C;AAAA,IAEA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,YAAU;AAAA,QACV,aAAaA,EAAE,0BAA0B;AAAA,QACzC,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAC7C;AAAA,IAEA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,oBAAoB;AAAA,QAC7B,cAAcA,EAAE,2BAA2B;AAAA,QAC3C,YAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEA,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAON,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP,EAAE,OAAO,YAAY,OAAOA,EAAE,qBAAqB,EAAE;AAAA,UACrD,EAAE,OAAO,WAAW,OAAOA,EAAE,oBAAoB,EAAE;AAAA,QAAA;AAAA,MACrD;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
@@ -2,8 +2,8 @@ import { jsxs as A, jsx as i } from "react/jsx-runtime";
2
2
  import { useFormContext as l, useWatch as d } from "react-hook-form";
3
3
  import { useTranslation as T } from "react-i18next";
4
4
  import { useCompensation as O } from "./useCompensation.js";
5
- import { FlsaStatus as a } from "../../../shared/constants.js";
6
5
  import { ActionsLayout as u } from "../../Common/ActionsLayout/ActionsLayout.js";
6
+ import { FlsaStatus as a } from "../../../shared/constants.js";
7
7
  import { useComponentContext as C } from "../../../contexts/ComponentAdapter/useComponentContext.js";
8
8
  const B = () => {
9
9
  const { isPending: s, mode: t, submitWithEffect: o, handleAdd: D, handleCancelAddJob: I, primaryFlsaStatus: r } = O(), { t: n } = T("Employee.Compensation"), { control: m } = l(), c = d({ control: m, name: "flsaStatus" }), e = C();
@@ -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 "../../../shared/constants.js";
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,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
+ {"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,GA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,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 "../../../shared/constants.js";
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 "../../../shared/constants.js";
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","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,qB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A,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 "../../../shared/constants.js";
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","TrashCanSv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ACpB,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 "../../../shared/constants.js";
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;"}
@@ -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 "../../../../shared/constants.js";
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;"}
@@ -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 "../../../shared/constants.js";
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;"}