@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":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccountVerify } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.BankAccount')\n const { isPending, handleCancel } = useBankAccountVerify()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n isLoading={isPending}\n onClick={handleCancel}\n data-testid=\"bank-account-verify-cancel\"\n >\n {t('cancelCta')}\n </Components.Button>\n <Components.Button\n type=\"submit\"\n isLoading={isPending}\n data-testid=\"bank-account-verify-submit\"\n >\n {t('verifyCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","handleCancel","useBankAccountVerify","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,GAAW,cAAAC,EAAa,IAAIC,EAAqB,GACnDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,WAAWH;AAAA,QACX,SAASC;AAAA,QACT,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAChB;AAAA,IACA,gBAAAK;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAK;AAAA,QACL,WAAWH;AAAA,QACX,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useBankAccountVerify } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.BankAccount')\n const { isPending, handleCancel } = useBankAccountVerify()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n isLoading={isPending}\n onClick={handleCancel}\n data-testid=\"bank-account-verify-cancel\"\n >\n {t('cancelCta')}\n </Components.Button>\n <Components.Button\n type=\"submit\"\n isLoading={isPending}\n data-testid=\"bank-account-verify-submit\"\n >\n {t('verifyCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","handleCancel","useBankAccountVerify","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,WAAAC,GAAW,cAAAC,EAAa,IAAIC,EAAqB,GACnDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,SAAQ;AAAA,QACR,WAAWH;AAAA,QACX,SAASC;AAAA,QACT,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAChB;AAAA,IACA,gBAAAK;AAAA,MAACH,EAAW;AAAA,MAAX;AAAA,QACC,MAAK;AAAA,QACL,WAAWH;AAAA,QACX,eAAY;AAAA,QAEX,YAAE,WAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { useTranslation as m } from "react-i18next";
3
- import { useDocumentList as e } from "./useDocumentList.js";
4
- import "../../../../shared/constants.js";
2
+ import { useTranslation as e } from "react-i18next";
3
+ import { useDocumentList as m } from "./useDocumentList.js";
5
4
  import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function d({ continueCtaLabel: t }) {
8
- const { t: n } = m("Company.DocumentList"), { handleContinue: i } = e(), r = c();
6
+ function l({ continueCtaLabel: t }) {
7
+ const { t: n } = e("Company.DocumentList"), { handleContinue: i } = m(), r = c();
9
8
  return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(r.Button, { onClick: i, children: t || n("continueCta") }) });
10
9
  }
11
10
  export {
12
- d as Actions
11
+ l as Actions
13
12
  };
14
13
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/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\ninterface ActionsProps {\n continueCtaLabel?: string\n}\n\nexport function Actions({ continueCtaLabel }: ActionsProps) {\n const { t } = useTranslation('Company.DocumentList')\n const { handleContinue } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue}>\n {continueCtaLabel || t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","continueCtaLabel","t","useTranslation","handleContinue","useDocumentList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AASgB,SAAAA,EAAQ,EAAE,kBAAAC,KAAkC;AAC1D,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,gBAAAC,EAAe,IAAIC,EAAgB,GACrCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,SAASF,GACzB,UAAoBH,KAAAC,EAAE,aAAa,EACtC,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/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\ninterface ActionsProps {\n continueCtaLabel?: string\n}\n\nexport function Actions({ continueCtaLabel }: ActionsProps) {\n const { t } = useTranslation('Company.DocumentList')\n const { handleContinue } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue}>\n {continueCtaLabel || t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","continueCtaLabel","t","useTranslation","handleContinue","useDocumentList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AASgB,SAAAA,EAAQ,EAAE,kBAAAC,KAAkC;AAC1D,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,gBAAAC,EAAe,IAAIC,EAAgB,GACrCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,SAASF,GACzB,UAAoBH,KAAAC,EAAE,aAAa,EACtC,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
- import { useFederalTaxes as i } from "./useFederalTaxes.js";
4
- import "../../../shared/constants.js";
5
- import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
3
+ import { useFederalTaxes as s } from "./useFederalTaxes.js";
4
+ import { ActionsLayout as i } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const l = () => {
8
- const { t } = r("Company.FederalTaxes"), { isPending: n } = i(), e = m();
9
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("continueCta") }) });
6
+ const f = () => {
7
+ const { t } = r("Company.FederalTaxes"), { isPending: n } = s(), e = m();
8
+ return /* @__PURE__ */ o(i, { children: /* @__PURE__ */ o(e.Button, { type: "submit", isLoading: n, children: t("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/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,WAAAC,EAAU,IAAIC,EAAgB,GAChCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/FederalTaxes/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.FederalTaxes')\n const { isPending } = useFederalTaxes()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","isPending","useFederalTaxes","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,WAAAC,EAAU,IAAIC,EAAgB,GAChCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAE,EAAA,aAAa,EAClB,CAAA,GACF;AAEJ;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as i } from "react-i18next";
3
- import { useIndustryApiState as s } from "./Context.js";
4
- import "../../../shared/constants.js";
2
+ import { useTranslation as s } from "react-i18next";
3
+ import { useIndustryApiState as i } from "./Context.js";
5
4
  import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const y = () => {
8
- const { t: o } = i("Company.Industry"), { isPending: n } = s(), r = e();
6
+ const f = () => {
7
+ const { t: o } = s("Company.Industry"), { isPending: n } = i(), r = e();
9
8
  return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(r.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
10
9
  };
11
10
  export {
12
- y 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/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAU,IAAIC,EAAoB,GACpCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAEF,EAAA,WAAW,EAChB,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAU,IAAIC,EAAoB,GACpCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAEF,EAAA,WAAW,EAChB,CAAA,GACF;AAEJ;"}
@@ -1,15 +1,14 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useTranslation as e } from "react-i18next";
3
- import { useIndustryItems as m } from "./Context.js";
4
- import "../../../shared/constants.js";
5
- import { ComboBoxField as s } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
6
- const d = () => {
7
- const { t: o } = e("Company.Industry"), { items: r } = m();
8
- return /* @__PURE__ */ t(
9
- s,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useTranslation as t } from "react-i18next";
3
+ import { useIndustryItems as s } from "./Context.js";
4
+ import { ComboBoxField as m } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
5
+ const p = () => {
6
+ const { t: o } = t("Company.Industry"), { items: e } = s();
7
+ return /* @__PURE__ */ r(
8
+ m,
10
9
  {
11
10
  isRequired: !0,
12
- options: r,
11
+ options: e,
13
12
  label: o("label"),
14
13
  name: "naics_code",
15
14
  placeholder: o("placeholder")
@@ -17,6 +16,6 @@ const d = () => {
17
16
  );
18
17
  };
19
18
  export {
20
- d as Edit
19
+ p as Edit
21
20
  };
22
21
  //# sourceMappingURL=Edit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAM,IAAIC,EAAiB;AAGjC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAC9B;AAEJ;"}
1
+ {"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAM,IAAIC,EAAiB;AAGjC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAC9B;AAEJ;"}
@@ -1,10 +1,9 @@
1
1
  import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useLocationsForm as e } from "./useLocationForm.js";
4
- import "../../../../shared/constants.js";
5
4
  import { ActionsLayout as c } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const h = () => {
6
+ const f = () => {
8
7
  const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = m();
9
8
  return /* @__PURE__ */ r(c, { children: [
10
9
  /* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("cancelCta") }),
@@ -12,6 +11,6 @@ const h = () => {
12
11
  ] });
13
12
  };
14
13
  export {
15
- h as Actions
14
+ f as Actions
16
15
  };
17
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,cAAAC,GAAc,WAAAC,EAAU,IAAIC,EAAiB,GAC/CC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,WAAW,EAChB,CAAA;AAAA,IACC,gBAAAQ,EAAAH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAEH,EAAA,SAAS,EACd,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,cAAAC,GAAc,WAAAC,EAAU,IAAIC,EAAiB,GAC/CC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,WAAW,EAChB,CAAA;AAAA,IACC,gBAAAQ,EAAAH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAEH,EAAA,SAAS,EACd,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,10 +1,9 @@
1
1
  import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
2
  import { useTranslation as s } from "react-i18next";
3
3
  import { useLocationsList as a } from "./useLocationsList.js";
4
- import "../../../../shared/constants.js";
5
4
  import { ActionsLayout as e } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- function L() {
6
+ function f() {
8
7
  const { t: o } = s("Company.Locations"), { handleAddLocation: i, handleContinue: r } = a(), n = m();
9
8
  return /* @__PURE__ */ c(e, { children: [
10
9
  /* @__PURE__ */ t(n.Button, { variant: "secondary", onClick: i, children: o("addLocationCta") }),
@@ -12,6 +11,6 @@ function L() {
12
11
  ] });
13
12
  }
14
13
  export {
15
- L as Actions
14
+ f as Actions
16
15
  };
17
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAe,IAAIC,EAAiB,GACzDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,gBAAgB,EACrB,CAAA;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAE,CAAA;AAAA,EAAA,GAChE;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationsList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.Locations')\n const { handleAddLocation, handleContinue } = useLocationsList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addLocationCta')}\n </Components.Button>\n <Components.Button onClick={handleContinue}>{t('continueCta')}</Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleAddLocation","handleContinue","useLocationsList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,mBAAAC,GAAmB,gBAAAC,EAAe,IAAIC,EAAiB,GACzDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAEF,EAAA,gBAAgB,EACrB,CAAA;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,SAASF,GAAiB,UAAAH,EAAE,aAAa,EAAE,CAAA;AAAA,EAAA,GAChE;AAEJ;"}
@@ -2,7 +2,6 @@ import { jsx as t, Fragment as r, jsxs as n } from "react/jsx-runtime";
2
2
  import { useTranslation as L } from "react-i18next";
3
3
  import { useLocationsList as C } from "./useLocationsList.js";
4
4
  import P from "../../../../assets/icons/pencil.svg.js";
5
- import "../../../../shared/constants.js";
6
5
  import { EmptyData as b } from "../../../Common/EmptyData/EmptyData.js";
7
6
  import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
8
7
  import { HamburgerMenu as x } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
@@ -10,7 +9,7 @@ import { getStreet as T, getCityStateZip as A } from "../../../../helpers/format
10
9
  import { VisuallyHidden as k } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
11
10
  import { useDataView as D } from "../../../Common/DataView/useDataView.js";
12
11
  import { DataView as S } from "../../../Common/DataView/DataView.js";
13
- const Z = () => {
12
+ const N = () => {
14
13
  const a = y(), {
15
14
  locationList: o,
16
15
  handleEditLocation: s,
@@ -77,6 +76,6 @@ const Z = () => {
77
76
  return /* @__PURE__ */ t(S, { label: e("locationListLabel"), ...f });
78
77
  };
79
78
  export {
80
- Z as List
79
+ N as List
81
80
  };
82
81
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"span\">{getStreet(location)}</Components.Text>\n <br />\n <Components.Text as=\"span\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAoB,GACjC;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAiB,GAEf,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMd;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOW,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAYI,MAEhB,gBAAAC,EAAAC,GAAA,EACE,4BAAC,WACC,EAAA,UAAA;AAAA,UAAA,gBAAAD,EAAClB,EAAW,MAAX,EAAgB,IAAG,QAAQ,UAAAoB,EAAUH,CAAQ,GAAE;AAAA,4BAC/C,MAAG,EAAA;AAAA,UACJ,gBAAAC,EAAClB,EAAW,MAAX,EAAgB,IAAG,QAAO,MAAK,MAC7B,UAAgBqB,EAAAJ,CAAQ,EAC3B,CAAA;AAAA,QAAA,EAAA,CACF,EACF,CAAA;AAAA,MAGN;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAC,EAACI,GAAgB,EAAA,UAAAT,EAAE,kBAAkB,GAAE;AAAA,QAC9C,QAAQ,CAAYI,MAGb,gBAAAM,EAAAJ,GAAA,EAAA,UAAA;AAAA,UAASF,EAAA,oCACPjB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAEa,EAAA,gBAAgB,EAAE,CAAA;AAAA,UAExDI,EAAS,iBAEL,gBAAAM,EAAAJ,GAAA,EAAA,UAAA;AAAA,YAAA;AAAA,YACD,gBAAAD,EAAClB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAa,EAAE,eAAe,EAAE,CAAA;AAAA,UAAA,EACxD,CAAA;AAAA,QAAA,GAEJ;AAAA,MAEJ;AAAA,IAEJ;AAAA,IACA,UAAU,CAAYI,MAElB,gBAAAC;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAOX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAV,EAAmBc,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAU,EAAA,eAAW,GAAC,CAAA;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QAEnB;AAAA,QACA,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAClC;AAAA,IAGJ,YAAY;AAAA,MACV,gBAAAJ;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAH;AAAA,MACA,YAAAC;AAAA,IACF;AAAA,IACA,YAAY,MACT,gBAAAa,EAAAQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAC,gBAAAK,EAAAlB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASW,GAC7C,UAAAE,EAAE,qBAAqB,EAC1B,CAAA,EACF,CAAA;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAS,EAAA,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/Company/Locations/LocationsList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsList } from './useLocationsList'\nimport PencilSvg from '@/assets/icons/pencil.svg?react'\nimport { DataView, EmptyData, useDataView, VisuallyHidden } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { getCityStateZip, getStreet } from '@/helpers/formattedStrings'\n\n/**List of employees slot for EmployeeList component */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n } = useLocationsList()\n\n const { t } = useTranslation('Company.Locations')\n const { ...dataViewProps } = useDataView({\n data: locationList,\n columns: [\n {\n key: 'name',\n title: t('locationListCol1'),\n render: location => {\n return (\n <>\n <address>\n <Components.Text as=\"span\">{getStreet(location)}</Components.Text>\n <br />\n <Components.Text as=\"span\" size=\"sm\">\n {getCityStateZip(location)}\n </Components.Text>\n </address>\n </>\n )\n },\n },\n {\n key: 'status',\n title: <VisuallyHidden>{t('locationListCol2')}</VisuallyHidden>,\n render: location => {\n return (\n <>\n {location.mailingAddress && (\n <Components.Badge status={'info'}>{t('mailingAddress')}</Components.Badge>\n )}\n {location.filingAddress && (\n <>\n {' '}\n <Components.Badge status={'info'}>{t('filingAddress')}</Components.Badge>\n </>\n )}\n </>\n )\n },\n },\n ],\n itemMenu: location => {\n return (\n <HamburgerMenu\n items={[\n {\n label: t('editCta'),\n onClick: () => {\n handleEditLocation(location.uuid)\n },\n icon: <PencilSvg aria-hidden />,\n 'data-testid': 'edit-location',\n },\n ]}\n data-testid=\"location-hamburger\"\n triggerLabel={t('hamburgerTitle')}\n />\n )\n },\n pagination: {\n handleNextPage,\n handleFirstPage,\n handleLastPage,\n handlePreviousPage,\n handleItemsPerPageChange,\n currentPage,\n totalPages,\n },\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')}>\n <Components.Button variant=\"secondary\" onClick={handleAddLocation}>\n {t('addFirstLocationCta')}\n </Components.Button>\n </EmptyData>\n ),\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","useLocationsList","t","useTranslation","dataViewProps","useDataView","location","jsx","Fragment","getStreet","getCityStateZip","VisuallyHidden","jsxs","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;AASO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAoB,GACjC;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAiB,GAEf,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAc,IAAIC,EAAY;AAAA,IACvC,MAAMd;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAOW,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAYI,MAEhB,gBAAAC,EAAAC,GAAA,EACE,4BAAC,WACC,EAAA,UAAA;AAAA,UAAA,gBAAAD,EAAClB,EAAW,MAAX,EAAgB,IAAG,QAAQ,UAAAoB,EAAUH,CAAQ,GAAE;AAAA,4BAC/C,MAAG,EAAA;AAAA,UACJ,gBAAAC,EAAClB,EAAW,MAAX,EAAgB,IAAG,QAAO,MAAK,MAC7B,UAAgBqB,EAAAJ,CAAQ,EAC3B,CAAA;AAAA,QAAA,EAAA,CACF,EACF,CAAA;AAAA,MAGN;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAC,EAACI,GAAgB,EAAA,UAAAT,EAAE,kBAAkB,GAAE;AAAA,QAC9C,QAAQ,CAAYI,MAGb,gBAAAM,EAAAJ,GAAA,EAAA,UAAA;AAAA,UAASF,EAAA,oCACPjB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAEa,EAAA,gBAAgB,EAAE,CAAA;AAAA,UAExDI,EAAS,iBAEL,gBAAAM,EAAAJ,GAAA,EAAA,UAAA;AAAA,YAAA;AAAA,YACD,gBAAAD,EAAClB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAAa,EAAE,eAAe,EAAE,CAAA;AAAA,UAAA,EACxD,CAAA;AAAA,QAAA,GAEJ;AAAA,MAEJ;AAAA,IAEJ;AAAA,IACA,UAAU,CAAYI,MAElB,gBAAAC;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAOX,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAV,EAAmBc,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAC,EAACO,GAAU,EAAA,eAAW,GAAC,CAAA;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QAEnB;AAAA,QACA,eAAY;AAAA,QACZ,cAAcZ,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAClC;AAAA,IAGJ,YAAY;AAAA,MACV,gBAAAJ;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAH;AAAA,MACA,YAAAC;AAAA,IACF;AAAA,IACA,YAAY,MACT,gBAAAa,EAAAQ,GAAA,EAAU,OAAOb,EAAE,iBAAiB,GAAG,aAAaA,EAAE,uBAAuB,GAC5E,UAAC,gBAAAK,EAAAlB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASW,GAC7C,UAAAE,EAAE,qBAAqB,EAC1B,CAAA,EACF,CAAA;AAAA,EAAA,CAEH;AACD,2BAAQc,GAAS,EAAA,OAAOd,EAAE,mBAAmB,GAAI,GAAGE,GAAe;AACrE;"}
@@ -1,19 +1,18 @@
1
1
  import { jsxs as e, Fragment as d, jsx as o } from "react/jsx-runtime";
2
2
  import { useTranslation as l } from "react-i18next";
3
3
  import { usePaySchedule as m } from "../usePaySchedule.js";
4
- import "../../../../shared/constants.js";
5
- import { ActionsLayout as i } from "../../../Common/ActionsLayout/ActionsLayout.js";
4
+ import { ActionsLayout as a } from "../../../Common/ActionsLayout/ActionsLayout.js";
6
5
  import { useComponentContext as u } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
7
- const E = () => {
8
- const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: a, handleCancel: r, handleContinue: s } = m(), t = u();
6
+ const S = () => {
7
+ const { t: n } = l("Company.PaySchedule"), { mode: c, handleAdd: r, handleCancel: i, handleContinue: s } = m(), t = u();
9
8
  return /* @__PURE__ */ e(d, { children: [
10
- c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(i, { children: [
9
+ c === "LIST_PAY_SCHEDULES" && /* @__PURE__ */ e(a, { children: [
11
10
  /* @__PURE__ */ o(
12
11
  t.Button,
13
12
  {
14
13
  variant: "secondary",
15
14
  onClick: () => {
16
- a();
15
+ r();
17
16
  },
18
17
  children: n("addAnotherPayScheduleCta")
19
18
  }
@@ -29,26 +28,26 @@ const E = () => {
29
28
  }
30
29
  )
31
30
  ] }),
32
- c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
31
+ c === "ADD_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
33
32
  /* @__PURE__ */ o(
34
33
  t.Button,
35
34
  {
36
35
  variant: "secondary",
37
36
  onClick: () => {
38
- r();
37
+ i();
39
38
  },
40
39
  children: n("actions.cancel")
41
40
  }
42
41
  ),
43
42
  /* @__PURE__ */ o(t.Button, { type: "submit", children: n("actions.save") })
44
43
  ] }),
45
- c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(i, { children: [
44
+ c === "EDIT_PAY_SCHEDULE" && /* @__PURE__ */ e(a, { children: [
46
45
  /* @__PURE__ */ o(
47
46
  t.Button,
48
47
  {
49
48
  variant: "secondary",
50
49
  onClick: () => {
51
- r();
50
+ i();
52
51
  },
53
52
  children: n("actions.cancel")
54
53
  }
@@ -58,6 +57,6 @@ const E = () => {
58
57
  ] });
59
58
  };
60
59
  export {
61
- E as Actions
60
+ S as Actions
62
61
  };
63
62
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAe,GACnEC,IAAaC,EAAoB;AAEvC,SAEK,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAASR,MAAA,0CACPS,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACH,YAAAJ,EAAA;AAAA,UACZ;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAC/B;AAAA,MACA,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACE,YAAAF,EAAA;AAAA,UACjB;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACA,YAAAH,EAAA;AAAA,UACf;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MACrB;AAAA,MACA,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAE,CAAA;AAAA,IAAA,GACtD;AAAA,IAEDE,MAAS,uBACR,gBAAAO,EAACE,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACA,YAAAH,EAAA;AAAA,UACf;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MACrB;AAAA,MACA,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAE,CAAA;AAAA,IAAA,EACtD,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/PaySchedule/_parts/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { usePaySchedule } from '../usePaySchedule'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.PaySchedule')\n const { mode, handleAdd, handleCancel, handleContinue } = usePaySchedule()\n const Components = useComponentContext()\n\n return (\n <>\n {mode === 'LIST_PAY_SCHEDULES' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleAdd()\n }}\n >\n {t('addAnotherPayScheduleCta')}\n </Components.Button>\n <Components.Button\n variant=\"primary\"\n onClick={() => {\n handleContinue()\n }}\n >\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )}\n {mode === 'ADD_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n {mode === 'EDIT_PAY_SCHEDULE' && (\n <ActionsLayout>\n <Components.Button\n variant=\"secondary\"\n onClick={() => {\n handleCancel()\n }}\n >\n {t('actions.cancel')}\n </Components.Button>\n <Components.Button type=\"submit\">{t('actions.save')}</Components.Button>\n </ActionsLayout>\n )}\n </>\n )\n}\n"],"names":["Actions","t","useTranslation","mode","handleAdd","handleCancel","handleContinue","usePaySchedule","Components","useComponentContext","jsxs","Fragment","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB,GAC5C,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,EAAA,IAAmBC,EAAe,GACnEC,IAAaC,EAAoB;AAEvC,SAEK,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAASR,MAAA,0CACPS,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACH,YAAAJ,EAAA;AAAA,UACZ;AAAA,UAEC,YAAE,0BAA0B;AAAA,QAAA;AAAA,MAC/B;AAAA,MACA,gBAAAS;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACE,YAAAF,EAAA;AAAA,UACjB;AAAA,UAEC,YAAE,aAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB,GACF;AAAA,IAEDH,MAAS,sBACR,gBAAAO,EAACE,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACA,YAAAH,EAAA;AAAA,UACf;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MACrB;AAAA,MACA,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAE,CAAA;AAAA,IAAA,GACtD;AAAA,IAEDE,MAAS,uBACR,gBAAAO,EAACE,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACL,EAAW;AAAA,QAAX;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACA,YAAAH,EAAA;AAAA,UACf;AAAA,UAEC,YAAE,gBAAgB;AAAA,QAAA;AAAA,MACrB;AAAA,MACA,gBAAAQ,EAACL,EAAW,QAAX,EAAkB,MAAK,UAAU,UAAAP,EAAE,cAAc,EAAE,CAAA;AAAA,IAAA,EACtD,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1,17 +1,16 @@
1
1
  import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
2
  import { useTranslation as a } from "react-i18next";
3
3
  import { useStateTaxesForm as s } from "./context.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 x() {
8
- const { t } = a("Company.StateTaxes", { keyPrefix: "form" }), { handleCancel: r, isPending: e } = s(), o = c();
6
+ function d() {
7
+ const { t } = a("Company.StateTaxes", { keyPrefix: "form" }), { handleCancel: e, isPending: r } = s(), o = c();
9
8
  return /* @__PURE__ */ i(m, { children: [
10
- /* @__PURE__ */ n(o.Button, { variant: "secondary", onClick: r, children: t("cancelCta") }),
11
- /* @__PURE__ */ n(o.Button, { variant: "primary", type: "submit", isDisabled: e, children: t("saveCta") })
9
+ /* @__PURE__ */ n(o.Button, { variant: "secondary", onClick: e, children: t("cancelCta") }),
10
+ /* @__PURE__ */ n(o.Button, { variant: "primary", type: "submit", isDisabled: r, children: t("saveCta") })
12
11
  ] });
13
12
  }
14
13
  export {
15
- x as Actions
14
+ d as Actions
16
15
  };
17
16
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AAClB,QAAA,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAU,IAAIC,EAAkB,GAChDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAE,EAAA,WAAW,EAChB,CAAA;AAAA,IACC,gBAAAM,EAAAH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAE,EAAA,SAAS,EACd,CAAA;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/StateTaxes/StateTaxesForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useStateTaxesForm } from './context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Company.StateTaxes', { keyPrefix: 'form' })\n const { handleCancel, isPending } = useStateTaxesForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button variant=\"primary\" type=\"submit\" isDisabled={isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleCancel","isPending","useStateTaxesForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,SAASA,IAAU;AAClB,QAAA,EAAE,MAAMC,EAAe,sBAAsB,EAAE,WAAW,QAAQ,GAClE,EAAE,cAAAC,GAAc,WAAAC,EAAU,IAAIC,EAAkB,GAChDC,IAAaC,EAAoB;AAEvC,2BACGC,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAE,EAAA,WAAW,EAChB,CAAA;AAAA,IACC,gBAAAM,EAAAH,EAAW,QAAX,EAAkB,SAAQ,WAAU,MAAK,UAAS,YAAYF,GAC5D,UAAE,EAAA,SAAS,EACd,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,100 +1,106 @@
1
- import { jsx as t, jsxs as D, Fragment as H } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as D, Fragment as H } from "react/jsx-runtime";
2
2
  import { useForm as K, FormProvider as M } from "react-hook-form";
3
3
  import { zodResolver as w } from "@hookform/resolvers/zod";
4
4
  import { useTaxRequirementsUpdateStateMutation as z } from "@gusto/embedded-api/react-query/taxRequirementsUpdateState";
5
5
  import { useTaxRequirementsGetSuspense as G } from "@gusto/embedded-api/react-query/taxRequirementsGet";
6
- import { z as a } from "zod";
6
+ import { z as r } from "zod";
7
7
  import { useMemo as L } from "react";
8
8
  import { useTranslation as X } from "react-i18next";
9
- import { Head as A } from "./Head.js";
9
+ import { Head as k } from "./Head.js";
10
10
  import { StateTaxesFormProvider as Y } from "./context.js";
11
- import { Form as P } from "./Form.js";
12
- import { Actions as j } from "./Actions.js";
11
+ import { Form as A } from "./Form.js";
12
+ import { Actions as P } from "./Actions.js";
13
13
  import { BaseComponent as $ } from "../../../Base/Base.js";
14
14
  import { useI18n as I } from "../../../../i18n/I18n.js";
15
15
  import { Flex as J } from "../../../Common/Flex/Flex.js";
16
16
  import { Form as Q } from "../../../Common/Form/Form.js";
17
- import { componentEvents as k } from "../../../../shared/constants.js";
17
+ import { componentEvents as q } from "../../../../shared/constants.js";
18
18
  import { useBase as W } from "../../../Base/useBase.js";
19
- function x(n) {
20
- return /* @__PURE__ */ t($, { ...n, children: /* @__PURE__ */ t(Z, { ...n, children: n.children }) });
19
+ function h(i) {
20
+ return /* @__PURE__ */ a($, { ...i, children: /* @__PURE__ */ a(Z, { ...i, children: i.children }) });
21
21
  }
22
- function Z({ companyId: n, state: S, className: q, children: v }) {
22
+ function Z({ companyId: i, state: y, className: _, children: x }) {
23
23
  I("Company.StateTaxes");
24
- const { onEvent: F, baseSubmitHandler: C } = W(), { t: l } = X("Company.StateTaxes", { keyPrefix: "form" }), { data: E } = G({ companyUuid: n, state: S }), f = E.taxRequirementsState, { mutateAsync: N, isPending: R } = z(), { dynamicSchema: V, defaultValues: O } = L(() => {
25
- const d = {}, i = {};
26
- return f.requirementSets?.forEach((e) => {
27
- if (!e.key) return;
28
- const m = e.key, s = {}, p = {};
29
- e.requirements?.forEach((o) => {
30
- if (!o.key) return;
31
- const g = o.key;
32
- p[g] = o.value ?? "";
33
- let y = a.string().min(1);
34
- const c = o.metadata?.validation;
35
- if (c && o.metadata?.type === "tax_rate")
36
- if (c.type === "min_max") {
37
- const r = parseFloat(c.min), u = parseFloat(c.max);
38
- !isNaN(r) && !isNaN(u) && (y = a.preprocess(
39
- (h) => Number(h),
40
- a.number().min(r, l("validations.minValue", { min: r })).max(u, l("validations.maxValue", { max: u })).transform((h) => String(h))
24
+ const { onEvent: F, baseSubmitHandler: j } = W(), { t: o } = X("Company.StateTaxes", { keyPrefix: "form" }), { data: C } = G({ companyUuid: i, state: y }), l = C.taxRequirementsState, { mutateAsync: E, isPending: N } = z(), { dynamicSchema: R, defaultValues: V } = L(() => {
25
+ const f = {}, s = {};
26
+ return l.requirementSets?.forEach((t) => {
27
+ if (!t.key) return;
28
+ const m = t.key, c = {}, p = {};
29
+ t.requirements?.forEach((e) => {
30
+ if (!e.key) return;
31
+ const g = e.key;
32
+ p[g] = e.metadata?.type === "radio" ? e.value ?? void 0 : e.value ? String(e.value) : "";
33
+ let v = r.string({
34
+ required_error: o("validations.required")
35
+ }).min(1, o("validations.required"));
36
+ const d = e.metadata?.validation;
37
+ if (d && e.metadata?.type === "tax_rate")
38
+ if (d.type === "min_max") {
39
+ const n = parseFloat(d.min), u = parseFloat(d.max);
40
+ !isNaN(n) && !isNaN(u) && (v = r.preprocess(
41
+ (S) => Number(S),
42
+ r.number().min(n, o("validations.minValue", { min: n })).max(u, o("validations.maxValue", { max: u })).transform((S) => String(S))
41
43
  ));
42
44
  } else {
43
- const r = c.rates;
44
- y = a.string().min(1).refine((u) => r.includes(u), {
45
- message: l("validations.oneOf", { values: r.join(", ") })
45
+ const n = d.rates;
46
+ v = r.string({
47
+ required_error: o("validations.required")
48
+ }).min(1, o("validations.required")).refine((u) => n.includes(u), {
49
+ message: o("validations.oneOf", { values: n.join(", ") })
46
50
  });
47
51
  }
48
- o.metadata?.type === "radio" && (y = a.boolean()), s[g] = y;
49
- }), Object.keys(s).length > 0 && (d[m] = a.object(s), i[m] = p);
52
+ e.metadata?.type === "radio" && (v = r.boolean({
53
+ required_error: o("validations.required")
54
+ })), c[g] = v;
55
+ }), Object.keys(c).length > 0 && (f[m] = r.object(c), s[m] = p);
50
56
  }), {
51
- dynamicSchema: a.object(d),
52
- defaultValues: i
57
+ dynamicSchema: r.object(f),
58
+ defaultValues: s
53
59
  };
54
- }, [f, l]), { control: U, ...T } = K({
55
- resolver: w(V),
56
- defaultValues: O
57
- }), _ = async (d) => {
58
- await C(d, async (i) => {
59
- const b = f.requirementSets?.filter((e) => e.key && i[e.key]).map((e) => {
60
- const m = e.key, s = i[m];
60
+ }, [l, o]), { control: O, ...T } = K({
61
+ resolver: w(R),
62
+ defaultValues: V
63
+ }), U = async (f) => {
64
+ await j(f, async (s) => {
65
+ const b = l.requirementSets?.filter((t) => t.key && s[t.key]).map((t) => {
66
+ const m = t.key, c = s[m];
61
67
  return {
62
- state: e.state,
68
+ state: t.state,
63
69
  key: m,
64
- effectiveFrom: e.effectiveFrom,
65
- requirements: Object.entries(s).map(([p, o]) => ({
70
+ effectiveFrom: t.effectiveFrom,
71
+ requirements: Object.entries(c).map(([p, e]) => ({
66
72
  key: p,
67
- value: String(o)
73
+ value: String(e)
68
74
  }))
69
75
  };
70
76
  });
71
- await N({
77
+ await E({
72
78
  request: {
73
- companyUuid: n,
79
+ companyUuid: i,
74
80
  requestBody: { requirementSets: b },
75
- state: S
81
+ state: y
76
82
  }
77
- }), F(k.COMPANY_STATE_TAX_UPDATED);
83
+ }), F(q.COMPANY_STATE_TAX_UPDATED);
78
84
  });
79
85
  }, B = () => {
80
- F(k.CANCEL);
86
+ F(q.CANCEL);
81
87
  };
82
- return /* @__PURE__ */ t("section", { className: q, children: /* @__PURE__ */ t(M, { ...T, control: U, children: /* @__PURE__ */ t(Q, { onSubmit: T.handleSubmit(_), children: /* @__PURE__ */ t(
88
+ return /* @__PURE__ */ a("section", { className: _, children: /* @__PURE__ */ a(M, { ...T, control: O, children: /* @__PURE__ */ a(Q, { onSubmit: T.handleSubmit(U), children: /* @__PURE__ */ a(
83
89
  Y,
84
90
  {
85
- value: { stateTaxRequirements: f, isPending: R, state: S, handleCancel: B },
86
- children: /* @__PURE__ */ t(J, { flexDirection: "column", gap: 32, children: v || /* @__PURE__ */ D(H, { children: [
87
- /* @__PURE__ */ t(A, {}),
88
- /* @__PURE__ */ t(P, {}),
89
- /* @__PURE__ */ t(j, {})
91
+ value: { stateTaxRequirements: l, isPending: N, state: y, handleCancel: B },
92
+ children: /* @__PURE__ */ a(J, { flexDirection: "column", gap: 32, children: x || /* @__PURE__ */ D(H, { children: [
93
+ /* @__PURE__ */ a(k, {}),
94
+ /* @__PURE__ */ a(A, {}),
95
+ /* @__PURE__ */ a(P, {})
90
96
  ] }) })
91
97
  }
92
98
  ) }) }) });
93
99
  }
94
- x.Head = A;
95
- x.Form = P;
96
- x.Actions = j;
100
+ h.Head = k;
101
+ h.Form = A;
102
+ h.Actions = P;
97
103
  export {
98
- x as StateTaxesForm
104
+ h as StateTaxesForm
99
105
  };
100
106
  //# sourceMappingURL=StateTaxesForm.js.map