@gusto/embedded-react-sdk 0.55.3 → 0.55.4

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 (130) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
  3. package/dist/components/Common/DataView/DataCards/DataCards.js +63 -54
  4. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  5. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +14 -12
  6. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  7. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
  8. package/dist/components/Common/DataView/DataTable/DataTable.js +75 -66
  9. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  10. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -4
  11. package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -1
  12. package/dist/components/Common/DataView/DataView.js +18 -17
  13. package/dist/components/Common/DataView/DataView.js.map +1 -1
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -6
  15. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -6
  17. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  18. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -8
  19. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  20. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -6
  21. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  22. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -6
  23. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  24. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -11
  25. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  26. package/dist/components/Company/Industry/Context.js +6 -9
  27. package/dist/components/Company/Industry/Context.js.map +1 -1
  28. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -6
  29. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  30. package/dist/components/Company/Locations/LocationsList/List.js +27 -25
  31. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  32. package/dist/components/Company/Locations/LocationsList/LocationsList.js +41 -36
  33. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  34. package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -0
  35. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -6
  36. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  37. package/dist/components/Company/OnboardingOverview/context.js +3 -6
  38. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  39. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +9 -2
  40. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +19 -18
  41. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  42. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +63 -62
  43. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  44. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -6
  45. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  46. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -6
  47. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  48. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js +69 -65
  49. package/dist/components/Company/StateTaxes/TaxRateManagement/AddTaxRateDialog.js.map +1 -1
  50. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -6
  51. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  52. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js +30 -23
  53. package/dist/components/Company/StateTaxes/TaxRateManagement/toHistoryRows.js.map +1 -1
  54. package/dist/components/Company/StateTaxes/shared/RequirementFields.d.ts +8 -4
  55. package/dist/components/Company/StateTaxes/shared/RequirementFields.js +13 -12
  56. package/dist/components/Company/StateTaxes/shared/RequirementFields.js.map +1 -1
  57. package/dist/components/Company/StateTaxes/shared/prepareRequirements.d.ts +29 -0
  58. package/dist/components/Company/StateTaxes/shared/prepareRequirements.js +24 -0
  59. package/dist/components/Company/StateTaxes/shared/prepareRequirements.js.map +1 -0
  60. package/dist/components/Company/StateTaxes/shared/prepareRequirements.test.d.ts +1 -0
  61. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +68 -55
  62. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  63. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +36 -35
  64. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  65. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -6
  66. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  67. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +84 -96
  68. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
  69. package/dist/components/Flow/Flow.js +22 -22
  70. package/dist/components/Flow/Flow.js.map +1 -1
  71. package/dist/components/Flow/useFlow.js +3 -3
  72. package/dist/components/InformationRequests/InformationRequests.d.ts +1 -1
  73. package/dist/components/InformationRequests/InformationRequests.js +68 -53
  74. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  75. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
  76. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  77. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +52 -50
  78. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  79. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
  80. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +86 -67
  81. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
  82. package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +4 -0
  83. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.d.ts +1 -1
  84. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js +26 -21
  85. package/dist/components/Payroll/OffCycleDeductionsSetting/OffCycleDeductionsSetting.js.map +1 -1
  86. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.d.ts +8 -1
  87. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +29 -17
  88. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  89. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js +21 -18
  90. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.js.map +1 -1
  91. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js +9 -7
  92. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTable.module.scss.js.map +1 -1
  93. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.d.ts +2 -0
  94. package/dist/components/Payroll/OffCycleTaxWithholdingTable/OffCycleTaxWithholdingTableTypes.js.map +1 -1
  95. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +193 -191
  96. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  97. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +3 -2
  98. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +31 -31
  99. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  100. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +254 -243
  101. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  102. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +83 -76
  103. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  104. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +23 -22
  105. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  106. package/dist/components/Payroll/PayrollList/PayrollList.js +108 -97
  107. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  108. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +38 -37
  109. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  110. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +176 -167
  111. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  112. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
  113. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +173 -164
  114. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  115. package/dist/components/Payroll/usePreparedPayrollData.js +12 -15
  116. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  117. package/dist/helpers/openPdfInNewTab.d.ts +15 -0
  118. package/dist/helpers/openPdfInNewTab.js +28 -0
  119. package/dist/helpers/openPdfInNewTab.js.map +1 -0
  120. package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
  121. package/dist/i18n/en/Payroll.OffCycleCreation.json.js +11 -9
  122. package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
  123. package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +7 -7
  124. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -27
  125. package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
  126. package/dist/i18n/en/Payroll.PayrollOverview.json.js +43 -41
  127. package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
  128. package/dist/i18n/types.d.ts +20 -0
  129. package/dist/style.css +1 -1
  130. package/package.json +17 -17
@@ -1,52 +1,53 @@
1
- import { jsxs as C, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as C, jsx as s } from "react/jsx-runtime";
2
2
  import { useRef as D, useMemo as w } from "react";
3
3
  import { PaginationControl as x } from "../PaginationControl/PaginationControl.js";
4
- import h from "./DataView.module.scss.js";
5
- import { DataTable as j } from "./DataTable/DataTable.js";
6
- import { DataCards as v } from "./DataCards/DataCards.js";
7
- import B from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
8
- const T = ({
4
+ import j from "./DataView.module.scss.js";
5
+ import { DataTable as v } from "./DataTable/DataTable.js";
6
+ import { DataCards as B } from "./DataCards/DataCards.js";
7
+ import M from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
8
+ const g = ({
9
9
  pagination: t,
10
- isFetching: s,
10
+ isFetching: o,
11
11
  breakAt: a = "small",
12
12
  breakpoints: i,
13
13
  footer: m,
14
14
  isWithinBox: p,
15
- emptyState: c,
16
- selectionMode: l,
15
+ emptyState: l,
16
+ selectionMode: c,
17
17
  onSelectAll: f,
18
18
  ...d
19
19
  }) => {
20
- const e = D(null), o = B({
20
+ const e = D(null), r = M({
21
21
  ref: e,
22
22
  breakpoints: i
23
- }), u = o.length > 0, r = !o.includes(a), b = w(() => r ? v : j, [r]);
23
+ }), u = r.length > 0, n = !r.includes(a), b = w(() => n ? B : v, [n]);
24
24
  return /* @__PURE__ */ C(
25
25
  "div",
26
26
  {
27
27
  "data-testid": "data-view",
28
- className: h.dataViewContainer,
28
+ className: j.dataViewContainer,
29
29
  ref: (k) => {
30
30
  e.current = k;
31
31
  },
32
32
  children: [
33
- u && /* @__PURE__ */ n(
33
+ u && /* @__PURE__ */ s(
34
34
  b,
35
35
  {
36
36
  ...d,
37
37
  onSelectAll: f,
38
38
  footer: m,
39
39
  isWithinBox: p,
40
- emptyState: c,
41
- selectionMode: l
40
+ emptyState: l,
41
+ selectionMode: c,
42
+ isFetching: o
42
43
  }
43
44
  ),
44
- t && /* @__PURE__ */ n(x, { ...t, isFetching: s })
45
+ t && /* @__PURE__ */ s(x, { ...t, isFetching: o })
45
46
  ]
46
47
  }
47
48
  );
48
49
  };
49
50
  export {
50
- T as DataView
51
+ g as DataView
51
52
  };
52
53
  //# sourceMappingURL=DataView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn, SelectionMode } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\n/** @internal */\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n onSelectAll?: useDataViewPropReturn<T>['onSelectAll']\n getIsItemSelected?: (item: T) => boolean\n hideSelectAll?: useDataViewPropReturn<T>['hideSelectAll']\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n isWithinBox?: TableProps['isWithinBox']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n selectionMode?: SelectionMode\n}\n\n/** @internal */\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n isWithinBox,\n emptyState,\n selectionMode,\n onSelectAll,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && (\n <Component\n {...dataViewProps}\n onSelectAll={onSelectAll}\n footer={footer}\n isWithinBox={isWithinBox}\n emptyState={emptyState}\n selectionMode={selectionMode}\n />\n )}\n {pagination && <PaginationControl {...pagination} isFetching={isFetching} />}\n </div>\n )\n}\n"],"names":["DataView","pagination","isFetching","breakAt","customBreakpoints","footer","isWithinBox","emptyState","selectionMode","onSelectAll","dataViewProps","containerRef","useRef","breakpoints","useContainerBreakpoints","isBreakpointsDetected","isMobile","Component","useMemo","DataCards","DataTable","jsxs","styles","ref","jsx","PaginationControl"],"mappings":";;;;;;;AA+BO,MAAMA,IAAW,CAAK;AAAA,EAC3B,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAaC;AAAA,EACb,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAwB;AACtB,QAAMC,IAAeC,EAA2B,IAAI,GAC9CC,IAAcC,EAAwB;AAAA,IAC1C,KAAKH;AAAA,IACL,aAAaP;AAAA,EAAA,CACd,GAGKW,IAAwBF,EAAY,SAAS,GAC7CG,IAAW,CAACH,EAAY,SAASV,CAAO,GAExCc,IAAYC,EAAQ,MACjBF,IAAWG,IAAYC,GAC7B,CAACJ,CAAQ,CAAC;AAEb,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWC,EAAO;AAAA,MAClB,KAAK,CAAAC,MAAO;AACV,QAAAZ,EAAa,UAAUY;AAAA,MACzB;AAAA,MAEC,UAAA;AAAA,QAAAR,KACC,gBAAAS;AAAA,UAACP;AAAA,UAAA;AAAA,YACE,GAAGP;AAAA,YACJ,aAAAD;AAAA,YACA,QAAAJ;AAAA,YACA,aAAAC;AAAA,YACA,YAAAC;AAAA,YACA,eAAAC;AAAA,UAAA;AAAA,QAAA;AAAA,QAGHP,KAAc,gBAAAuB,EAACC,GAAA,EAAmB,GAAGxB,GAAY,YAAAC,EAAA,CAAwB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhF;"}
1
+ {"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn, SelectionMode } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\n/** @internal */\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n onSelectAll?: useDataViewPropReturn<T>['onSelectAll']\n getIsItemSelected?: (item: T) => boolean\n hideSelectAll?: useDataViewPropReturn<T>['hideSelectAll']\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n isWithinBox?: TableProps['isWithinBox']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n selectionMode?: SelectionMode\n}\n\n/** @internal */\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n isWithinBox,\n emptyState,\n selectionMode,\n onSelectAll,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && (\n <Component\n {...dataViewProps}\n onSelectAll={onSelectAll}\n footer={footer}\n isWithinBox={isWithinBox}\n emptyState={emptyState}\n selectionMode={selectionMode}\n isFetching={isFetching}\n />\n )}\n {pagination && <PaginationControl {...pagination} isFetching={isFetching} />}\n </div>\n )\n}\n"],"names":["DataView","pagination","isFetching","breakAt","customBreakpoints","footer","isWithinBox","emptyState","selectionMode","onSelectAll","dataViewProps","containerRef","useRef","breakpoints","useContainerBreakpoints","isBreakpointsDetected","isMobile","Component","useMemo","DataCards","DataTable","jsxs","styles","ref","jsx","PaginationControl"],"mappings":";;;;;;;AA+BO,MAAMA,IAAW,CAAK;AAAA,EAC3B,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAaC;AAAA,EACb,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAwB;AACtB,QAAMC,IAAeC,EAA2B,IAAI,GAC9CC,IAAcC,EAAwB;AAAA,IAC1C,KAAKH;AAAA,IACL,aAAaP;AAAA,EAAA,CACd,GAGKW,IAAwBF,EAAY,SAAS,GAC7CG,IAAW,CAACH,EAAY,SAASV,CAAO,GAExCc,IAAYC,EAAQ,MACjBF,IAAWG,IAAYC,GAC7B,CAACJ,CAAQ,CAAC;AAEb,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWC,EAAO;AAAA,MAClB,KAAK,CAAAC,MAAO;AACV,QAAAZ,EAAa,UAAUY;AAAA,MACzB;AAAA,MAEC,UAAA;AAAA,QAAAR,KACC,gBAAAS;AAAA,UAACP;AAAA,UAAA;AAAA,YACE,GAAGP;AAAA,YACJ,aAAAD;AAAA,YACA,QAAAJ;AAAA,YACA,aAAAC;AAAA,YACA,YAAAC;AAAA,YACA,eAAAC;AAAA,YACA,YAAAN;AAAA,UAAA;AAAA,QAAA;AAAA,QAGHD,KAAc,gBAAAuB,EAACC,GAAA,EAAmB,GAAGxB,GAAY,YAAAC,EAAA,CAAwB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhF;"}
@@ -9,15 +9,12 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
- import "dompurify";
13
- import "../../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../../shared/constants.js";
15
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
18
- const [f, v] = t("CreateSignatoryContext");
15
+ const [d, s] = t("CreateSignatoryContext");
19
16
  export {
20
- v as CreateSignatoryProvider,
21
- f as useCreateSignatory
17
+ s as CreateSignatoryProvider,
18
+ d as useCreateSignatory
22
19
  };
23
20
  //# sourceMappingURL=useCreateSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * Initial values for the {@link CreateSignatory} form fields. At least one field must be provided.\n *\n * @public\n */\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport {\n /** @internal */\n useCreateSignatory,\n /** @internal */\n CreateSignatoryProvider,\n}\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * Initial values for the {@link CreateSignatory} form fields. At least one field must be provided.\n *\n * @public\n */\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport {\n /** @internal */\n useCreateSignatory,\n /** @internal */\n CreateSignatoryProvider,\n}\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -9,15 +9,12 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
- import "dompurify";
13
- import "../../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../../shared/constants.js";
15
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
18
- const [s, u] = t("InviteSignatoryContext");
15
+ const [S, c] = t("InviteSignatoryContext");
19
16
  export {
20
- u as InviteSignatoryProvider,
21
- s as useInviteSignatory
17
+ c as InviteSignatoryProvider,
18
+ S as useInviteSignatory
22
19
  };
23
20
  //# sourceMappingURL=useInviteSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\n/**\n * Default values for the invite signatory form fields: `firstName`, `lastName`, `email`,\n * `confirmEmail`, and `title`. At least one field is required.\n *\n * @public\n */\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\n/**\n * Default values for the invite signatory form fields: `firstName`, `lastName`, `email`,\n * `confirmEmail`, and `title`. At least one field is required.\n *\n * @public\n */\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -9,19 +9,16 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
- import "dompurify";
13
- import "../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../shared/constants.js";
15
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
14
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
18
- const C = {
15
+ const d = {
19
16
  createSignatory: "createSignatory",
20
17
  inviteSignatory: "inviteSignatory"
21
- }, [u, f] = t("AssignSignatoryContext");
18
+ }, [v, x] = t("AssignSignatoryContext");
22
19
  export {
23
- f as AssignSignatoryProvider,
24
- C as SignatoryAssignmentMode,
25
- u as useAssignSignatory
20
+ x as AssignSignatoryProvider,
21
+ d as SignatoryAssignmentMode,
22
+ v as useAssignSignatory
26
23
  };
27
24
  //# sourceMappingURL=useAssignSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\n/**\n * Default values for the create and invite forms rendered by {@link AssignSignatory}.\n *\n * @remarks\n * At least one of `create` or `invite` must be provided.\n *\n * @public\n */\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAOO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GAuBM,CAACC,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\n/**\n * Default values for the create and invite forms rendered by {@link AssignSignatory}.\n *\n * @remarks\n * At least one of `create` or `invite` must be provided.\n *\n * @public\n */\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAOO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GAuBM,CAACC,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -9,15 +9,12 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
- import "dompurify";
13
- import "../../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../../shared/constants.js";
15
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
18
- const [F, f] = o("BankAccountContext");
15
+ const [C, d] = o("BankAccountContext");
19
16
  export {
20
- f as BankAccountFormProvider,
21
- F as useBankAccountForm
17
+ d as BankAccountFormProvider,
18
+ C as useBankAccountForm
22
19
  };
23
20
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport { type OnEventType } from '@/components/Base/useBase'\nimport { type EventType } from '@/shared/constants'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n isEditing: boolean\n onEvent: OnEventType<EventType, unknown>\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,oBAAoB;"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport { type OnEventType } from '@/components/Base/useBase'\nimport { type EventType } from '@/shared/constants'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n isEditing: boolean\n onEvent: OnEventType<EventType, unknown>\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,oBAAoB;"}
@@ -9,17 +9,14 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
- import "dompurify";
13
- import "../../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../../shared/constants.js";
15
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
14
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
18
- const [v, y] = t(
15
+ const [a, d] = t(
19
16
  "CompanyDocumentListContext"
20
17
  );
21
18
  export {
22
- y as DocumentListProvider,
23
- v as useDocumentList
19
+ d as DocumentListProvider,
20
+ a as useDocumentList
24
21
  };
25
22
  //# sourceMappingURL=useDocumentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n companyForms: FormSchema[]\n documentListError: Error | null\n handleRequestFormToSign: (form: FormSchema) => void\n handleChangeSignatory: () => void\n handleContinue: () => void\n isSelfSignatory: boolean\n signatory?: Signatory\n}\n\nconst [useDocumentList, DocumentListProvider] = createCompoundContext<DocumentListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAcA,MAAM,CAACA,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n companyForms: FormSchema[]\n documentListError: Error | null\n handleRequestFormToSign: (form: FormSchema) => void\n handleChangeSignatory: () => void\n handleContinue: () => void\n isSelfSignatory: boolean\n signatory?: Signatory\n}\n\nconst [useDocumentList, DocumentListProvider] = createCompoundContext<DocumentListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,CAACA,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -1,5 +1,5 @@
1
1
  import { z as o } from "zod";
2
- import { FilingForm as r, TaxPayerType as t } from "@gusto/embedded-api/models/components/federaltaxdetails";
2
+ import { FilingForm as r, TaxPayerType as e } from "@gusto/embedded-api/models/components/federaltaxdetails";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "react-error-boundary";
@@ -11,23 +11,20 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
11
11
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
12
12
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
13
13
  import "@gusto/embedded-api/models/errors/httpclienterrors";
14
- import "dompurify";
15
- import "../../../contexts/LocaleProvider/useLocale.js";
16
14
  import "../../../shared/constants.js";
17
15
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
18
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
19
- import { createCompoundContext as e } from "../../Base/createCompoundContext.js";
20
- const v = o.object({
16
+ import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
17
+ const C = o.object({
21
18
  federalEin: o.string().optional(),
22
- taxPayerType: o.enum(Object.values(t)).optional(),
19
+ taxPayerType: o.enum(Object.values(e)).optional(),
23
20
  filingForm: o.enum(Object.values(r)).optional(),
24
21
  legalName: o.string().min(1)
25
- }), [P, O] = e(
22
+ }), [b, j] = t(
26
23
  "CompanyFederalTaxesContext"
27
24
  );
28
25
  export {
29
- v as FederalTaxFormSchema,
30
- O as FederalTaxesProvider,
31
- P as useFederalTaxes
26
+ C as FederalTaxFormSchema,
27
+ j as FederalTaxesProvider,
28
+ b as useFederalTaxes
32
29
  };
33
30
  //# sourceMappingURL=useFederalTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\n/** @internal */\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\n/**\n * Pre-populated values for the company federal tax form, supplied via {@link FederalTaxesProps}.\n * At least one of `taxPayerType`, `filingForm`, or `legalName` must be provided.\n *\n * @public\n */\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;;;AAOO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAsBK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
1
+ {"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { FilingForm, TaxPayerType } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\n/** @internal */\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\n/**\n * Pre-populated values for the company federal tax form, supplied via {@link FederalTaxesProps}.\n * At least one of `taxPayerType`, `filingForm`, or `legalName` must be provided.\n *\n * @public\n */\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAOO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAsBK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
@@ -9,21 +9,18 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
- import "dompurify";
13
- import "../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../shared/constants.js";
15
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
14
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
18
- const [v, x] = t("IndustryItems", {
15
+ const [A, P] = t("IndustryItems", {
19
16
  items: []
20
- }), [C, S] = t("IndustryApi", {
17
+ }), [f, v] = t("IndustryApi", {
21
18
  isPending: !1
22
19
  });
23
20
  export {
24
- S as IndustryApiStateProvider,
25
- x as IndustryItemsProvider,
26
- C as useIndustryApiState,
27
- v as useIndustryItems
21
+ v as IndustryApiStateProvider,
22
+ P as IndustryItemsProvider,
23
+ f as useIndustryApiState,
24
+ A as useIndustryItems
28
25
  };
29
26
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
1
+ {"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
@@ -9,17 +9,14 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
- import "dompurify";
13
- import "../../../../contexts/LocaleProvider/useLocale.js";
14
12
  import "../../../../shared/constants.js";
15
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
- import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
17
14
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
18
- const [v, y] = o(
15
+ const [d, L] = o(
19
16
  "CompanyDocumentFormContext"
20
17
  );
21
18
  export {
22
- y as LocationsFormProvider,
23
- v as useLocationsForm
19
+ L as LocationsFormProvider,
20
+ d as useLocationsForm
24
21
  };
25
22
  //# sourceMappingURL=useLocationForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
1
+ {"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
@@ -1,18 +1,18 @@
1
- import { jsxs as r, jsx as e, Fragment as o } from "react/jsx-runtime";
2
- import { useTranslation as P } from "react-i18next";
3
- import { useLocationsList as y } from "./useLocationsList.js";
4
- import b from "./List.module.scss.js";
5
- import x from "../../../../assets/icons/pencil.svg.js";
6
- import { EmptyData as T } from "../../../Common/EmptyData/EmptyData.js";
7
- import { HamburgerMenu as A } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
8
- import { useComponentContext as k } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
- import { getStreet as w, getCityStateZip as D } from "../../../../helpers/formattedStrings.js";
1
+ import { jsxs as r, jsx as e, Fragment as n } from "react/jsx-runtime";
2
+ import { useTranslation as y } from "react-i18next";
3
+ import { useLocationsList as b } from "./useLocationsList.js";
4
+ import x from "./List.module.scss.js";
5
+ import T from "../../../../assets/icons/pencil.svg.js";
6
+ import { EmptyData as A } from "../../../Common/EmptyData/EmptyData.js";
7
+ import { HamburgerMenu as k } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
8
+ import { useComponentContext as w } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
9
+ import { getStreet as D, getCityStateZip as F } from "../../../../helpers/formattedStrings.js";
10
10
  import { VisuallyHidden as S } from "../../../Common/VisuallyHidden/VisuallyHidden.js";
11
11
  import { useDataView as V } from "../../../Common/DataView/useDataView.js";
12
12
  import { DataView as v } from "../../../Common/DataView/DataView.js";
13
- const J = () => {
14
- const a = k(), {
15
- locationList: n,
13
+ const K = () => {
14
+ const a = w(), {
15
+ locationList: o,
16
16
  handleEditLocation: s,
17
17
  currentPage: d,
18
18
  totalPages: l,
@@ -23,24 +23,25 @@ const J = () => {
23
23
  handleNextPage: p,
24
24
  handlePreviousPage: h,
25
25
  handleAddLocation: f,
26
- itemsPerPage: C
27
- } = y(), { t } = P("Company.Locations"), { ...L } = V({
28
- data: n,
26
+ itemsPerPage: C,
27
+ isFetching: L
28
+ } = b(), { t } = y("Company.Locations"), { ...P } = V({
29
+ data: o,
29
30
  columns: [
30
31
  {
31
32
  key: "name",
32
33
  title: t("locationListCol1"),
33
- render: (i) => /* @__PURE__ */ r("address", { className: b.addressCell, children: [
34
- /* @__PURE__ */ e(a.Text, { size: "sm", weight: "medium", children: w(i) }),
35
- /* @__PURE__ */ e(a.Text, { size: "sm", children: D(i) })
34
+ render: (i) => /* @__PURE__ */ r("address", { className: x.addressCell, children: [
35
+ /* @__PURE__ */ e(a.Text, { size: "sm", weight: "medium", children: D(i) }),
36
+ /* @__PURE__ */ e(a.Text, { size: "sm", children: F(i) })
36
37
  ] })
37
38
  },
38
39
  {
39
40
  key: "status",
40
41
  title: /* @__PURE__ */ e(S, { children: t("locationListCol2") }),
41
- render: (i) => /* @__PURE__ */ r(o, { children: [
42
+ render: (i) => /* @__PURE__ */ r(n, { children: [
42
43
  i.mailingAddress && /* @__PURE__ */ e(a.Badge, { status: "info", children: t("mailingAddress") }),
43
- i.filingAddress && /* @__PURE__ */ r(o, { children: [
44
+ i.filingAddress && /* @__PURE__ */ r(n, { children: [
44
45
  " ",
45
46
  /* @__PURE__ */ e(a.Badge, { status: "info", children: t("filingAddress") })
46
47
  ] })
@@ -48,7 +49,7 @@ const J = () => {
48
49
  }
49
50
  ],
50
51
  itemMenu: (i) => /* @__PURE__ */ e(
51
- A,
52
+ k,
52
53
  {
53
54
  items: [
54
55
  {
@@ -56,7 +57,7 @@ const J = () => {
56
57
  onClick: () => {
57
58
  s(i.uuid);
58
59
  },
59
- icon: /* @__PURE__ */ e(x, { "aria-hidden": !0 }),
60
+ icon: /* @__PURE__ */ e(T, { "aria-hidden": !0 }),
60
61
  "data-testid": "edit-location"
61
62
  }
62
63
  ],
@@ -75,11 +76,12 @@ const J = () => {
75
76
  totalCount: m,
76
77
  itemsPerPage: C
77
78
  },
78
- emptyState: () => /* @__PURE__ */ e(T, { title: t("emptyTableTitle"), description: t("emptyTableDescription"), children: /* @__PURE__ */ e(a.Button, { variant: "secondary", onClick: f, children: t("addFirstLocationCta") }) })
79
+ emptyState: () => /* @__PURE__ */ e(A, { title: t("emptyTableTitle"), description: t("emptyTableDescription"), children: /* @__PURE__ */ e(a.Button, { variant: "secondary", onClick: f, children: t("addFirstLocationCta") }) }),
80
+ isFetching: L
79
81
  });
80
- return /* @__PURE__ */ e(v, { label: t("locationListLabel"), ...L });
82
+ return /* @__PURE__ */ e(v, { label: t("locationListLabel"), ...P });
81
83
  };
82
84
  export {
83
- J as List
85
+ K as List
84
86
  };
85
87
  //# 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 styles from './List.module.scss'\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/** @internal */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n totalCount,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n itemsPerPage,\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 <address className={styles.addressCell}>\n <Components.Text size=\"sm\" weight=\"medium\">\n {getStreet(location)}\n </Components.Text>\n <Components.Text size=\"sm\">{getCityStateZip(location)}</Components.Text>\n </address>\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 totalCount,\n itemsPerPage,\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","totalCount","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","itemsPerPage","useLocationsList","useTranslation","dataViewProps","useDataView","location","jsxs","styles","jsx","getStreet","getCityStateZip","VisuallyHidden","Fragment","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;AAUO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,cAAAC;AAAA,EAAA,IACEC,EAAA,GAEE,EAAE,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMf;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAgB,MAEJ,gBAAAC,EAAC,WAAA,EAAQ,WAAWC,EAAO,aACzB,UAAA;AAAA,UAAA,gBAAAC,EAACrB,EAAW,MAAX,EAAgB,MAAK,MAAK,QAAO,UAC/B,UAAAsB,EAAUJ,CAAQ,EAAA,CACrB;AAAA,UACA,gBAAAG,EAACrB,EAAW,MAAX,EAAgB,MAAK,MAAM,UAAAuB,EAAgBL,CAAQ,EAAA,CAAE;AAAA,QAAA,GACxD;AAAA,MAEJ;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAG,EAACG,GAAA,EAAgB,UAAA,EAAE,kBAAkB,GAAE;AAAA,QAC9C,QAAQ,CAAAN,MAEJ,gBAAAC,EAAAM,GAAA,EACG,UAAA;AAAA,UAAAP,EAAS,oCACPlB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAA,EAAE,gBAAgB,EAAA,CAAE;AAAA,UAExDkB,EAAS,iBACR,gBAAAC,EAAAM,GAAA,EACG,UAAA;AAAA,YAAA;AAAA,YACD,gBAAAJ,EAACrB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAA,EAAE,eAAe,EAAA,CAAE;AAAA,UAAA,EAAA,CACxD;AAAA,QAAA,GAEJ;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAkB,MAEN,gBAAAG;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAvB,EAAmBe,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAG,EAACM,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAc,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAjB;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAO;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAQ,EAACO,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,GAC5E,UAAA,gBAAAP,EAACrB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASY,GAC7C,UAAA,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,EAAA,CAEH;AACD,2BAAQiB,GAAA,EAAS,OAAO,EAAE,mBAAmB,GAAI,GAAGb,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 styles from './List.module.scss'\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/** @internal */\nexport const List = () => {\n const Components = useComponentContext()\n const {\n locationList,\n handleEditLocation,\n currentPage,\n totalPages,\n totalCount,\n handleFirstPage,\n handleItemsPerPageChange,\n handleLastPage,\n handleNextPage,\n handlePreviousPage,\n handleAddLocation,\n itemsPerPage,\n isFetching,\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 <address className={styles.addressCell}>\n <Components.Text size=\"sm\" weight=\"medium\">\n {getStreet(location)}\n </Components.Text>\n <Components.Text size=\"sm\">{getCityStateZip(location)}</Components.Text>\n </address>\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 totalCount,\n itemsPerPage,\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 isFetching,\n })\n return <DataView label={t('locationListLabel')} {...dataViewProps} />\n}\n"],"names":["List","Components","useComponentContext","locationList","handleEditLocation","currentPage","totalPages","totalCount","handleFirstPage","handleItemsPerPageChange","handleLastPage","handleNextPage","handlePreviousPage","handleAddLocation","itemsPerPage","isFetching","useLocationsList","useTranslation","dataViewProps","useDataView","location","jsxs","styles","jsx","getStreet","getCityStateZip","VisuallyHidden","Fragment","HamburgerMenu","PencilSvg","EmptyData","DataView"],"mappings":";;;;;;;;;;;;AAUO,MAAMA,IAAO,MAAM;AACxB,QAAMC,IAAaC,EAAA,GACb;AAAA,IACJ,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,IACEC,EAAA,GAEE,EAAE,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,GAAGC,EAAA,IAAkBC,EAAY;AAAA,IACvC,MAAMhB;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,KAAK;AAAA,QACL,OAAO,EAAE,kBAAkB;AAAA,QAC3B,QAAQ,CAAAiB,MAEJ,gBAAAC,EAAC,WAAA,EAAQ,WAAWC,EAAO,aACzB,UAAA;AAAA,UAAA,gBAAAC,EAACtB,EAAW,MAAX,EAAgB,MAAK,MAAK,QAAO,UAC/B,UAAAuB,EAAUJ,CAAQ,EAAA,CACrB;AAAA,UACA,gBAAAG,EAACtB,EAAW,MAAX,EAAgB,MAAK,MAAM,UAAAwB,EAAgBL,CAAQ,EAAA,CAAE;AAAA,QAAA,GACxD;AAAA,MAEJ;AAAA,MAEF;AAAA,QACE,KAAK;AAAA,QACL,OAAO,gBAAAG,EAACG,GAAA,EAAgB,UAAA,EAAE,kBAAkB,GAAE;AAAA,QAC9C,QAAQ,CAAAN,MAEJ,gBAAAC,EAAAM,GAAA,EACG,UAAA;AAAA,UAAAP,EAAS,oCACPnB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAA,EAAE,gBAAgB,EAAA,CAAE;AAAA,UAExDmB,EAAS,iBACR,gBAAAC,EAAAM,GAAA,EACG,UAAA;AAAA,YAAA;AAAA,YACD,gBAAAJ,EAACtB,EAAW,OAAX,EAAiB,QAAQ,QAAS,UAAA,EAAE,eAAe,EAAA,CAAE;AAAA,UAAA,EAAA,CACxD;AAAA,QAAA,GAEJ;AAAA,MAEJ;AAAA,IACF;AAAA,IAEF,UAAU,CAAAmB,MAEN,gBAAAG;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,YACE,OAAO,EAAE,SAAS;AAAA,YAClB,SAAS,MAAM;AACb,cAAAxB,EAAmBgB,EAAS,IAAI;AAAA,YAClC;AAAA,YACA,MAAM,gBAAAG,EAACM,GAAA,EAAU,eAAW,GAAA,CAAC;AAAA,YAC7B,eAAe;AAAA,UAAA;AAAA,QACjB;AAAA,QAEF,eAAY;AAAA,QACZ,cAAc,EAAE,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAItC,YAAY;AAAA,MACV,gBAAAlB;AAAA,MACA,iBAAAH;AAAA,MACA,gBAAAE;AAAA,MACA,oBAAAE;AAAA,MACA,0BAAAH;AAAA,MACA,aAAAJ;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAO;AAAA,IAAA;AAAA,IAEF,YAAY,MACV,gBAAAS,EAACO,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,GAC5E,UAAA,gBAAAP,EAACtB,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASY,GAC7C,UAAA,EAAE,qBAAqB,EAAA,CAC1B,EAAA,CACF;AAAA,IAEF,YAAAE;AAAA,EAAA,CACD;AACD,2BAAQgB,GAAA,EAAS,OAAO,EAAE,mBAAmB,GAAI,GAAGb,GAAe;AACrE;"}
@@ -1,48 +1,53 @@
1
- import { jsx as o, jsxs as l, Fragment as L } from "react/jsx-runtime";
2
- import { useLocationsGetSuspense as h } from "@gusto/embedded-api/react-query/locationsGet";
3
- import { Head as u } from "./Head.js";
4
- import { List as C } from "./List.js";
5
- import { Actions as O } from "./Actions.js";
6
- import { LocationsListProvider as A } from "./useLocationsList.js";
7
- import { useI18n as E } from "../../../../i18n/I18n.js";
8
- import { BaseComponent as N } from "../../../Base/Base.js";
9
- import { useBase as P } from "../../../Base/useBase.js";
10
- import { Flex as g } from "../../../Common/Flex/Flex.js";
11
- import { companyEvents as i } from "../../../../shared/constants.js";
12
- import { usePagination as I } from "../../../../hooks/usePagination/usePagination.js";
13
- function H(t) {
14
- return /* @__PURE__ */ o(N, { ...t, children: /* @__PURE__ */ o(_, { ...t, children: t.children }) });
1
+ import { jsx as o, jsxs as h, Fragment as O } from "react/jsx-runtime";
2
+ import { keepPreviousData as C } from "@tanstack/react-query";
3
+ import { useLocationsGet as A } from "@gusto/embedded-api/react-query/locationsGet";
4
+ import { Head as g } from "./Head.js";
5
+ import { List as E } from "./List.js";
6
+ import { Actions as P } from "./Actions.js";
7
+ import { LocationsListProvider as N } from "./useLocationsList.js";
8
+ import { useI18n as I } from "../../../../i18n/I18n.js";
9
+ import { BaseComponent as _, BaseLayout as v } from "../../../Base/Base.js";
10
+ import { useBase as x } from "../../../Base/useBase.js";
11
+ import { Flex as D } from "../../../Common/Flex/Flex.js";
12
+ import { companyEvents as r } from "../../../../shared/constants.js";
13
+ import { usePagination as T } from "../../../../hooks/usePagination/usePagination.js";
14
+ function J(t) {
15
+ return /* @__PURE__ */ o(_, { ...t, children: /* @__PURE__ */ o(y, { ...t, children: t.children }) });
15
16
  }
16
- function _({ companyId: t, className: r, children: e }) {
17
- E("Company.Locations");
18
- const { onEvent: n } = P(), { getPaginationProps: s } = I(), {
19
- data: { companyLocationsList: m, httpMeta: a }
20
- } = h({ companyId: t }), c = () => {
21
- n(i.COMPANY_LOCATION_DONE);
22
- }, p = () => {
23
- n(i.COMPANY_LOCATION_CREATE);
24
- }, d = (f) => {
25
- n(i.COMPANY_LOCATION_EDIT, { uuid: f });
17
+ function y({ companyId: t, className: a, children: i, LoaderComponent: s }) {
18
+ I("Company.Locations");
19
+ const { onEvent: n } = x(), { getPaginationProps: m } = T(), { data: e, isFetching: c } = A(
20
+ { companyId: t },
21
+ { placeholderData: C, throwOnError: !0 }
22
+ ), p = () => {
23
+ n(r.COMPANY_LOCATION_DONE);
24
+ }, d = () => {
25
+ n(r.COMPANY_LOCATION_CREATE);
26
+ }, f = (u) => {
27
+ n(r.COMPANY_LOCATION_EDIT, { uuid: u });
26
28
  };
27
- return /* @__PURE__ */ o("section", { className: r, children: /* @__PURE__ */ o(
28
- A,
29
+ if (!e)
30
+ return /* @__PURE__ */ o(v, { isLoading: !0, LoaderComponent: s });
31
+ const { companyLocationsList: l, httpMeta: L } = e;
32
+ return /* @__PURE__ */ o("section", { className: a, children: /* @__PURE__ */ o(
33
+ N,
29
34
  {
30
35
  value: {
31
- ...s(a.response.headers),
32
- locationList: m ?? [],
33
- handleAddLocation: p,
34
- handleEditLocation: d,
35
- handleContinue: c
36
+ ...m(L.response.headers, c),
37
+ locationList: l ?? [],
38
+ handleAddLocation: d,
39
+ handleEditLocation: f,
40
+ handleContinue: p
36
41
  },
37
- children: /* @__PURE__ */ o(g, { flexDirection: "column", gap: 32, alignItems: "stretch", children: e || /* @__PURE__ */ l(L, { children: [
38
- /* @__PURE__ */ o(u, {}),
39
- /* @__PURE__ */ o(C, {}),
40
- /* @__PURE__ */ o(O, {})
42
+ children: /* @__PURE__ */ o(D, { flexDirection: "column", gap: 32, alignItems: "stretch", children: i || /* @__PURE__ */ h(O, { children: [
43
+ /* @__PURE__ */ o(g, {}),
44
+ /* @__PURE__ */ o(E, {}),
45
+ /* @__PURE__ */ o(P, {})
41
46
  ] }) })
42
47
  }
43
48
  ) });
44
49
  }
45
50
  export {
46
- H as LocationsList
51
+ J as LocationsList
47
52
  };
48
53
  //# sourceMappingURL=LocationsList.js.map