@gusto/embedded-react-sdk 0.56.2 → 0.56.3

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 (183) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/Common/FieldCaption/FieldCaption.js +18 -24
  3. package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -1
  4. package/dist/components/Common/FieldCaption/FieldCaption.module.scss.js +3 -5
  5. package/dist/components/Common/FieldCaption/FieldCaption.module.scss.js.map +1 -1
  6. package/dist/components/Common/PaginationControl/PaginationControl.js +66 -62
  7. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  8. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  9. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  10. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  11. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +6 -3
  12. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  13. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +6 -3
  14. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +8 -5
  16. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  17. package/dist/components/Company/BankAccount/BankAccountForm/context.js +6 -3
  18. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  19. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +6 -3
  20. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  21. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -8
  22. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  23. package/dist/components/Company/Industry/Context.js +9 -6
  24. package/dist/components/Company/Industry/Context.js.map +1 -1
  25. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +6 -3
  26. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  27. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +6 -3
  28. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  29. package/dist/components/Company/OnboardingOverview/context.js +6 -3
  30. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  31. package/dist/components/Company/PaySchedule/management/PaySchedule.js +60 -0
  32. package/dist/components/Company/PaySchedule/management/PaySchedule.js.map +1 -0
  33. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentReviewStepPresentation.js +67 -0
  34. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentReviewStepPresentation.js.map +1 -0
  35. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js +59 -0
  36. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js.map +1 -0
  37. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js +57 -0
  38. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js.map +1 -0
  39. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js +46 -0
  40. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js.map +1 -0
  41. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js +101 -0
  42. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js.map +1 -0
  43. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js +81 -0
  44. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js.map +1 -0
  45. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/stripNullAssignmentPreviewFields.js +18 -0
  46. package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/stripNullAssignmentPreviewFields.js.map +1 -0
  47. package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js +56 -0
  48. package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js.map +1 -0
  49. package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js +34 -0
  50. package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js.map +1 -0
  51. package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.js +77 -0
  52. package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.js.map +1 -0
  53. package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.module.scss.js +10 -0
  54. package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.module.scss.js.map +1 -0
  55. package/dist/components/Company/PaySchedule/management/payScheduleManagementStateMachine.js +66 -0
  56. package/dist/components/Company/PaySchedule/management/payScheduleManagementStateMachine.js.map +1 -0
  57. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +75 -57
  58. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  59. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +6 -3
  60. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  61. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +6 -3
  62. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  63. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +6 -3
  64. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  65. package/dist/components/Company/StateTaxes/shared/requirementSetError.js +15 -0
  66. package/dist/components/Company/StateTaxes/shared/requirementSetError.js.map +1 -0
  67. package/dist/components/Company/exports/companyManagement.js +7 -0
  68. package/dist/components/Company/exports/companyManagement.js.map +1 -0
  69. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +6 -3
  70. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  71. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  72. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
  73. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
  74. package/dist/components/Flow/Flow.js +1 -1
  75. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +28 -27
  76. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  77. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +51 -58
  78. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  79. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +12 -7
  80. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  81. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +87 -85
  82. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  83. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +1 -1
  84. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  85. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +55 -54
  86. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  87. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +66 -62
  88. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
  89. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +129 -125
  90. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  91. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +30 -27
  92. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  93. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js +41 -30
  94. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/fields.js.map +1 -1
  95. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.js.map +1 -1
  96. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js +159 -152
  97. package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js.map +1 -1
  98. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +61 -59
  99. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  100. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +32 -31
  101. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  102. package/dist/components/Payroll/PayrollList/PayrollList.js +16 -16
  103. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  104. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  105. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +61 -61
  106. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  107. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +192 -193
  108. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  109. package/dist/components/Payroll/Transition/TransitionFlow.js +27 -22
  110. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
  111. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +55 -53
  112. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
  113. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +44 -41
  114. package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
  115. package/dist/components/Payroll/helpers.js +72 -67
  116. package/dist/components/Payroll/helpers.js.map +1 -1
  117. package/dist/components/Payroll/usePreparedPayrollData.js +37 -25
  118. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  119. package/dist/contexts/ApiProvider/ApiProvider.js +23 -22
  120. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  121. package/dist/contexts/ApiProvider/informationRequestEnumHook.js +30 -0
  122. package/dist/contexts/ApiProvider/informationRequestEnumHook.js.map +1 -0
  123. package/dist/contexts/UnstableFeaturesProvider/useUnstableFeature.js.map +1 -1
  124. package/dist/helpers/dateFormatting.js.map +1 -1
  125. package/dist/helpers/formattedStrings.js +9 -8
  126. package/dist/helpers/formattedStrings.js.map +1 -1
  127. package/dist/i18n/I18n.js +2 -0
  128. package/dist/i18n/I18n.js.map +1 -1
  129. package/dist/i18n/en/Company.Management.PaySchedule.json.js +24 -0
  130. package/dist/i18n/en/Company.Management.PaySchedule.json.js.map +1 -0
  131. package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js +18 -0
  132. package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js.map +1 -0
  133. package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
  134. package/dist/i18n/en/Payroll.GrossUpModal.json.js +12 -14
  135. package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
  136. package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
  137. package/dist/i18n/en/common.json.js +36 -38
  138. package/dist/i18n/en/common.json.js.map +1 -1
  139. package/dist/index.js +137 -135
  140. package/dist/index.js.map +1 -1
  141. package/dist/package.json.js +1 -1
  142. package/dist/shared/constants.js +39 -31
  143. package/dist/shared/constants.js.map +1 -1
  144. package/dist/src/components/Company/PaySchedule/management/PaySchedule.d.ts +24 -0
  145. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentReviewStepPresentation.d.ts +10 -0
  146. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.d.ts +11 -0
  147. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.d.ts +9 -0
  148. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.d.ts +35 -0
  149. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.d.ts +29 -0
  150. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/index.d.ts +1 -0
  151. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.d.ts +7 -0
  152. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/stripNullAssignmentPreviewFields.d.ts +12 -0
  153. package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/usePayScheduleAssignment.d.ts +9 -0
  154. package/dist/src/components/Company/PaySchedule/management/PayScheduleManagementComponents.d.ts +20 -0
  155. package/dist/src/components/Company/PaySchedule/management/PayScheduleOverview.d.ts +11 -0
  156. package/dist/src/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.d.ts +18 -0
  157. package/dist/src/components/Company/PaySchedule/management/index.d.ts +1 -0
  158. package/dist/src/components/Company/PaySchedule/management/payScheduleManagementStateMachine.d.ts +12 -0
  159. package/dist/src/components/Company/StateTaxes/shared/requirementSetError.d.ts +18 -0
  160. package/dist/src/components/Company/StateTaxes/shared/requirementSetError.test.d.ts +1 -0
  161. package/dist/src/components/Company/exports/companyManagement.d.ts +2 -0
  162. package/dist/src/components/Payroll/PayrollBlocker/payrollHelpers.d.ts +12 -0
  163. package/dist/src/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +6 -1
  164. package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/payrollEditEmployeeHelpers.d.ts +2 -2
  165. package/dist/src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +6 -1
  166. package/dist/src/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +7 -1
  167. package/dist/src/components/Payroll/helpers.d.ts +34 -0
  168. package/dist/src/components/Payroll/usePreparedPayrollData.d.ts +6 -1
  169. package/dist/src/components/index.d.ts +12 -0
  170. package/dist/src/contexts/ApiProvider/informationRequestEnumHook.d.ts +14 -0
  171. package/dist/src/contexts/ApiProvider/informationRequestEnumHook.test.d.ts +1 -0
  172. package/dist/src/contexts/UnstableFeaturesProvider/useUnstableFeature.d.ts +2 -0
  173. package/dist/src/helpers/dateFormatting.d.ts +2 -2
  174. package/dist/src/helpers/formattedStrings.d.ts +15 -0
  175. package/dist/src/i18n/en/common.json.d.ts +0 -1
  176. package/dist/src/i18n/types.d.ts +96 -6
  177. package/dist/src/models/external.d.ts +12 -0
  178. package/dist/src/shared/constants.d.ts +16 -0
  179. package/dist/style.css +1 -1
  180. package/dist/types/sdkError.js +32 -21
  181. package/dist/types/sdkError.js.map +1 -1
  182. package/docs/guides/endpoint-inventory.json +59 -10
  183. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n *\n * @remarks Handles `YYYY-MM-DD` strings by parsing them in local time to avoid\n * timezone drift. Also accepts ISO timestamp strings and existing `Date`\n * instances. Returns `null` for nullish, empty, or unparseable input.\n *\n * @param dateInput - The date value to normalize.\n * @returns A `Date` instance, or `null` if the input is missing or invalid.\n * @internal\n */\nexport const normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\n/**\n * Formats a date as a short weekday plus short month and day (e.g. `Mon, Jan 5`).\n *\n * @internal\n */\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a short weekday, short month, day, and year (e.g. `Mon, Jan 5, 2025`).\n *\n * @internal\n */\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Formats a date as a short month and day (e.g. `Jan 5`).\n *\n * @internal\n */\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a short month, day, and year (e.g. `Jan 5, 2025`).\n *\n * @internal\n */\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Formats a date as a long month and day (e.g. `January 5`).\n *\n * @internal\n */\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a long month, day, and year (e.g. `January 5, 2025`).\n *\n * @internal\n */\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Splits a date into separate locale-formatted time and date strings.\n *\n * @param dateInput - The date value to format.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleString`.\n * @returns An object with `time` (e.g. `3:45 PM EST`) and `date` (e.g. `Mon, Jan 5`).\n * Both fields are empty strings when the input cannot be parsed.\n * @internal\n */\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\n/**\n * Formats a pay period start and end date for display as separate fields.\n *\n * @remarks Start date renders with the long month and day; end date renders\n * with the short month, day, and year.\n *\n * @param startDateInput - Pay period start date.\n * @param endDateInput - Pay period end date.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleDateString`.\n * @returns Formatted `startDate` and `endDate` strings. Both fields are empty\n * strings when either input cannot be parsed.\n * @internal\n */\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\n/**\n * Formats a pay period as a single en-dash–separated range string.\n *\n * @param startDateInput - Pay period start date.\n * @param endDateInput - Pay period end date.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleDateString`.\n * @param options - When `useShortMonth` is true, both ends use short month names.\n * Otherwise the start uses the long month name and the end uses short.\n * @returns The formatted range (e.g. `January 1–Jan 15, 2025`), or an empty\n * string when either input cannot be parsed.\n * @internal\n */\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\n/**\n * Formats a `Date` as a `YYYY-MM-DD` string using the local year, month, and day.\n *\n * @param date - The date to format.\n * @returns A zero-padded `YYYY-MM-DD` string, or `null` when the input is an invalid date.\n * @internal\n */\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n const year = String(date.getFullYear()).padStart(4, '0')\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/**\n * Converts any parseable date string to a `YYYY-MM-DD` ISO string using local time.\n *\n * @remarks Reads the local year, month, and day so the calendar date is\n * preserved regardless of the runtime timezone. Safe for dates parsed from\n * locale-format strings (e.g. `4/16/1998`) or ISO strings, both of which land\n * at local midnight when normalized.\n *\n * @param value - The date string to convert.\n * @returns A `YYYY-MM-DD` string, or `''` for nullish, empty, or unparseable input.\n * @internal\n */\nexport const normalizeToISOString = (value?: string | null): string => {\n if (!value) return ''\n const date = normalizeToDate(value)\n if (!date) return ''\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/**\n * Normalizes a `Date` to local midnight, stripping any time-of-day component.\n *\n * @param date - The date to normalize, or `null`.\n * @returns A new `Date` at local midnight, or `null` when the input is missing or invalid.\n * @internal\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n return new Date(date.getFullYear(), date.getMonth(), date.getDate())\n}\n\n/**\n * Number of milliseconds in one hour.\n *\n * @internal\n */\nexport const MS_PER_HOUR = 1000 * 60 * 60\nconst MS_PER_DAY = MS_PER_HOUR * 24\n\n/**\n * Returns the number of hours from now until a deadline.\n *\n * @param deadline - Target date in the future (or past, for negative results).\n * @returns Hours until `deadline` (fractional, negative if `deadline` is in\n * the past), or `null` when the input cannot be parsed.\n * @internal\n */\nexport const getHoursUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_HOUR\n}\n\n/**\n * Returns the number of days from now until a deadline.\n *\n * @param deadline - Target date in the future (or past, for negative results).\n * @returns Days until `deadline` (fractional, negative if `deadline` is in\n * the past), or `null` when the input cannot be parsed.\n * @internal\n */\nexport const getDaysUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_DAY\n}\n\n/**\n * Returns whether a date falls on Saturday or Sunday.\n *\n * @param date - The date to test.\n * @returns `true` if `date` is a weekend day.\n * @internal\n */\nconst isWeekend = (date: Date): boolean => {\n const day = date.getDay()\n return day === 0 || day === 6\n}\n\n/**\n * Returns a new `Date` offset from the input by a given number of days.\n *\n * @param date - The base date. Not mutated.\n * @param days - Number of days to add (negative values subtract).\n * @returns A new `Date` shifted by `days`.\n * @internal\n */\nexport const addDays = (date: Date, days: number): Date => {\n const result = new Date(date)\n result.setDate(result.getDate() + days)\n return result\n}\n\n/**\n * Returns a new `Date` offset by a given number of years.\n *\n * @param date - The base date. Not mutated.\n * @param years - Number of years to add (negative values subtract).\n * @returns A new `Date` shifted by `years`.\n * @internal\n */\nexport const addYears = (date: Date, years: number): Date => {\n const result = new Date(date)\n result.setFullYear(result.getFullYear() + years)\n return result\n}\n\n/**\n * Returns a new `Date` offset by a given number of business days (Monday–Friday).\n *\n * @remarks Skips Saturdays and Sundays when counting. The result is normalized\n * to local midnight. Does not account for holidays.\n *\n * @param startDate - The base date. Not mutated.\n * @param businessDays - Number of business days to add.\n * @returns A new `Date` shifted forward by `businessDays` weekdays.\n * @internal\n */\nexport const addBusinessDays = (startDate: Date, businessDays: number): Date => {\n let currentDate = new Date(startDate)\n currentDate.setHours(0, 0, 0, 0)\n let daysAdded = 0\n\n while (daysAdded < businessDays) {\n currentDate = addDays(currentDate, 1)\n if (!isWeekend(currentDate)) {\n daysAdded++\n }\n }\n\n return currentDate\n}\n\n/**\n * Formats numeric month and day as a zero-padded `MM-DD` string.\n *\n * @param month - Month number, 1–12.\n * @param day - Day-of-month number, 1–31.\n * @returns A `MM-DD` string, or `undefined` when either argument is missing.\n * @internal\n */\nexport function formatMonthDay(month?: number, day?: number): string | undefined {\n if (month == null || day == null) return undefined\n return `${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`\n}\n\n/**\n * Returns the number of days in a given month (1-indexed).\n *\n * @remarks Uses a non-leap year, so February always returns 28.\n *\n * @param month - Month number, 1–12.\n * @returns The number of days in that month.\n * @internal\n */\nexport function getDaysInMonth(month: number): number {\n return new Date(2023, month, 0).getDate()\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","normalizeToISOString","value","normalizeDateToLocal","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil","isWeekend","addDays","days","result","addYears","years","addBusinessDays","businessDays","currentDate","daysAdded","formatMonthDay","getDaysInMonth"],"mappings":"AAWO,MAAMA,IAAkB,CAACC,MAAkD;AAChF,MAAI,CA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BL;AACtB,GAUaM,IAAe,CAACH,MAAmD;AAC9E,QAAMC,IAAetC,EAAgBqC,CAAQ;AAC7C,MAAI,CAACC,EAAc,QAAO;AAE1B,QAAMC,wBAAU,KAAA;AAEhB,UADmBD,EAAa,QAAA,IAAYC,EAAI,QAAA,KAC5BJ;AACtB,GASMM,IAAY,CAAC9B,MAAwB;AACzC,QAAML,IAAMK,EAAK,OAAA;AACjB,SAAOL,MAAQ,KAAKA,MAAQ;AAC9B,GAUaoC,IAAU,CAAC/B,GAAYgC,MAAuB;AACzD,QAAMC,IAAS,IAAI,KAAKjC,CAAI;AAC5B,SAAAiC,EAAO,QAAQA,EAAO,QAAA,IAAYD,CAAI,GAC/BC;AACT,GAUaC,IAAW,CAAClC,GAAYmC,MAAwB;AAC3D,QAAMF,IAAS,IAAI,KAAKjC,CAAI;AAC5B,SAAAiC,EAAO,YAAYA,EAAO,YAAA,IAAgBE,CAAK,GACxCF;AACT,GAaaG,IAAkB,CAACvB,GAAiBwB,MAA+B;AAC9E,MAAIC,IAAc,IAAI,KAAKzB,CAAS;AACpC,EAAAyB,EAAY,SAAS,GAAG,GAAG,GAAG,CAAC;AAC/B,MAAIC,IAAY;AAEhB,SAAOA,IAAYF;AACjB,IAAAC,IAAcP,EAAQO,GAAa,CAAC,GAC/BR,EAAUQ,CAAW,KACxBC;AAIJ,SAAOD;AACT;AAUO,SAASE,EAAe9C,GAAgBC,GAAkC;AAC/E,MAAI,EAAAD,KAAS,QAAQC,KAAO;AAC5B,WAAO,GAAG,OAAOD,CAAK,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAOC,CAAG,EAAE,SAAS,GAAG,GAAG,CAAC;AAC1E;AAWO,SAAS8C,EAAe/C,GAAuB;AACpD,SAAO,IAAI,KAAK,MAAMA,GAAO,CAAC,EAAE,QAAA;AAClC;"}
1
+ {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n *\n * @remarks Handles `YYYY-MM-DD` strings by parsing them in local time to avoid\n * timezone drift. Also accepts ISO timestamp strings and existing `Date`\n * instances. Returns `null` for nullish, empty, or unparseable input.\n *\n * @param dateInput - The date value to normalize.\n * @returns A `Date` instance, or `null` if the input is missing or invalid.\n * @internal\n */\nexport const normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\n/**\n * Formats a date as a short weekday plus short month and day (e.g. `Mon, Jan 5`).\n *\n * @internal\n */\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a short weekday, short month, day, and year (e.g. `Mon, Jan 5, 2025`).\n *\n * @internal\n */\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Formats a date as a short month and day (e.g. `Jan 5`).\n *\n * @internal\n */\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a short month, day, and year (e.g. `Jan 5, 2025`).\n *\n * @internal\n */\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Formats a date as a long month and day (e.g. `January 5`).\n *\n * @internal\n */\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a long month, day, and year (e.g. `January 5, 2025`).\n *\n * @internal\n */\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Splits a date into separate locale-formatted time and date strings.\n *\n * @param dateInput - The date value to format.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleString`.\n * @returns An object with `time` (e.g. `3:45 PM EST`) and `date` (e.g. `Mon, Jan 5`).\n * Both fields are empty strings when the input cannot be parsed.\n * @internal\n */\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\n/**\n * Formats a pay period start and end date for display as separate fields.\n *\n * @remarks Start date renders with the long month and day; end date renders\n * with the short month, day, and year.\n *\n * @param startDateInput - Pay period start date.\n * @param endDateInput - Pay period end date.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleDateString`.\n * @returns Formatted `startDate` and `endDate` strings. Both fields are empty\n * strings when either input cannot be parsed.\n * @internal\n */\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\n/**\n * Formats a pay period as a single en-dash–separated range string.\n *\n * @param startDateInput - Pay period start date.\n * @param endDateInput - Pay period end date.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleDateString`.\n * @param options - When `useShortMonth` is true, both ends use short month names.\n * Otherwise both use the long month name.\n * @returns The formatted range (e.g. `January 1–January 15, 2025`), or an empty\n * string when either input cannot be parsed.\n * @internal\n */\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\n/**\n * Formats a `Date` as a `YYYY-MM-DD` string using the local year, month, and day.\n *\n * @param date - The date to format.\n * @returns A zero-padded `YYYY-MM-DD` string, or `null` when the input is an invalid date.\n * @internal\n */\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n const year = String(date.getFullYear()).padStart(4, '0')\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/**\n * Converts any parseable date string to a `YYYY-MM-DD` ISO string using local time.\n *\n * @remarks Reads the local year, month, and day so the calendar date is\n * preserved regardless of the runtime timezone. Safe for dates parsed from\n * locale-format strings (e.g. `4/16/1998`) or ISO strings, both of which land\n * at local midnight when normalized.\n *\n * @param value - The date string to convert.\n * @returns A `YYYY-MM-DD` string, or `''` for nullish, empty, or unparseable input.\n * @internal\n */\nexport const normalizeToISOString = (value?: string | null): string => {\n if (!value) return ''\n const date = normalizeToDate(value)\n if (!date) return ''\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/**\n * Normalizes a `Date` to local midnight, stripping any time-of-day component.\n *\n * @param date - The date to normalize, or `null`.\n * @returns A new `Date` at local midnight, or `null` when the input is missing or invalid.\n * @internal\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n return new Date(date.getFullYear(), date.getMonth(), date.getDate())\n}\n\n/**\n * Number of milliseconds in one hour.\n *\n * @internal\n */\nexport const MS_PER_HOUR = 1000 * 60 * 60\nconst MS_PER_DAY = MS_PER_HOUR * 24\n\n/**\n * Returns the number of hours from now until a deadline.\n *\n * @param deadline - Target date in the future (or past, for negative results).\n * @returns Hours until `deadline` (fractional, negative if `deadline` is in\n * the past), or `null` when the input cannot be parsed.\n * @internal\n */\nexport const getHoursUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_HOUR\n}\n\n/**\n * Returns the number of days from now until a deadline.\n *\n * @param deadline - Target date in the future (or past, for negative results).\n * @returns Days until `deadline` (fractional, negative if `deadline` is in\n * the past), or `null` when the input cannot be parsed.\n * @internal\n */\nexport const getDaysUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_DAY\n}\n\n/**\n * Returns whether a date falls on Saturday or Sunday.\n *\n * @param date - The date to test.\n * @returns `true` if `date` is a weekend day.\n * @internal\n */\nconst isWeekend = (date: Date): boolean => {\n const day = date.getDay()\n return day === 0 || day === 6\n}\n\n/**\n * Returns a new `Date` offset from the input by a given number of days.\n *\n * @param date - The base date. Not mutated.\n * @param days - Number of days to add (negative values subtract).\n * @returns A new `Date` shifted by `days`.\n * @internal\n */\nexport const addDays = (date: Date, days: number): Date => {\n const result = new Date(date)\n result.setDate(result.getDate() + days)\n return result\n}\n\n/**\n * Returns a new `Date` offset by a given number of years.\n *\n * @param date - The base date. Not mutated.\n * @param years - Number of years to add (negative values subtract).\n * @returns A new `Date` shifted by `years`.\n * @internal\n */\nexport const addYears = (date: Date, years: number): Date => {\n const result = new Date(date)\n result.setFullYear(result.getFullYear() + years)\n return result\n}\n\n/**\n * Returns a new `Date` offset by a given number of business days (Monday–Friday).\n *\n * @remarks Skips Saturdays and Sundays when counting. The result is normalized\n * to local midnight. Does not account for holidays.\n *\n * @param startDate - The base date. Not mutated.\n * @param businessDays - Number of business days to add.\n * @returns A new `Date` shifted forward by `businessDays` weekdays.\n * @internal\n */\nexport const addBusinessDays = (startDate: Date, businessDays: number): Date => {\n let currentDate = new Date(startDate)\n currentDate.setHours(0, 0, 0, 0)\n let daysAdded = 0\n\n while (daysAdded < businessDays) {\n currentDate = addDays(currentDate, 1)\n if (!isWeekend(currentDate)) {\n daysAdded++\n }\n }\n\n return currentDate\n}\n\n/**\n * Formats numeric month and day as a zero-padded `MM-DD` string.\n *\n * @param month - Month number, 1–12.\n * @param day - Day-of-month number, 1–31.\n * @returns A `MM-DD` string, or `undefined` when either argument is missing.\n * @internal\n */\nexport function formatMonthDay(month?: number, day?: number): string | undefined {\n if (month == null || day == null) return undefined\n return `${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`\n}\n\n/**\n * Returns the number of days in a given month (1-indexed).\n *\n * @remarks Uses a non-leap year, so February always returns 28.\n *\n * @param month - Month number, 1–12.\n * @returns The number of days in that month.\n * @internal\n */\nexport function getDaysInMonth(month: number): number {\n return new Date(2023, month, 0).getDate()\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","normalizeToISOString","value","normalizeDateToLocal","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil","isWeekend","addDays","days","result","addYears","years","addBusinessDays","businessDays","currentDate","daysAdded","formatMonthDay","getDaysInMonth"],"mappings":"AAWO,MAAMA,IAAkB,CAACC,MAAkD;AAChF,MAAI,CAACA,EAAW,QAAO;AAEvB,MAAI,OAAOA,KAAc,UAAU;AACjC,QAAI,sBAAsB,KAAKA,CAAS,GAAG;AACzC,YAAMC,IAAQD,EAAU,MAAM,GAAG;AACjC,UAAIC,EAAM,WAAW,EAAG,QAAO;AAE/B,YAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AAKrB,aAJIC,MAAS,UAAaC,MAAU,UAAaC,MAAQ,UAKvD,MAAMF,CAAI,KACV,MAAMC,CAAK,KACX,MAAMC,CAAG,KACTD,IAAQ,KACRA,IAAQ,MACRC,IAAM,KACNA,IAAM,KAEC,OAGF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AAAA,IACtC;AAEA,UAAMC,IAAa,IAAI,KAAKN,CAAS;AACrC,WAAO,MAAMM,EAAW,QAAA,CAAS,IAAI,OAAOA;AAAA,EAC9C;AAEA,SAAIN,aAAqB,OAChB,MAAMA,EAAU,QAAA,CAAS,IA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;AACpC,EAAAyB,EAAY,SAAS,GAAG,GAAG,GAAG,CAAC;AAC/B,MAAIC,IAAY;AAEhB,SAAOA,IAAYF;AACjB,IAAAC,IAAcP,EAAQO,GAAa,CAAC,GAC/BR,EAAUQ,CAAW,KACxBC;AAIJ,SAAOD;AACT;AAUO,SAASE,EAAe9C,GAAgBC,GAAkC;AAC/E,MAAI,EAAAD,KAAS,QAAQC,KAAO;AAC5B,WAAO,GAAG,OAAOD,CAAK,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAOC,CAAG,EAAE,SAAS,GAAG,GAAG,CAAC;AAC1E;AAWO,SAAS8C,EAAe/C,GAAuB;AACpD,SAAO,IAAI,KAAK,MAAMA,GAAO,CAAC,EAAE,QAAA;AAClC;"}
@@ -9,9 +9,9 @@ const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1), S = ({
9
9
  }) => `${t ? c(t) : ""}${e ? a(c(e)) : ""}${r ? a(c(r)) : ""}`, a = (t) => t ? ` ${t}` : "", p = (t) => {
10
10
  const e = a(t.street1), r = a(t.street2);
11
11
  return `${e},${r}`;
12
- }, D = (t) => [t.street1?.trim(), t.street2?.trim()].filter(
12
+ }, L = (t) => [t.street1?.trim(), t.street2?.trim()].filter(
13
13
  (r) => !!r
14
- ).join(", "), y = (t) => `${a(t.city)}, ${a(t.state)} ${a(t.zip)}`, L = (t) => `${p(t)} ${y(t)}`, f = (t, e) => e ? `${t}%` : `$${t}`, s = (t, e = "en-US") => {
14
+ ).join(", "), y = (t) => `${a(t.city)}, ${a(t.state)} ${a(t.zip)}`, D = (t) => `${p(t)} ${y(t)}`, f = (t, e) => e ? `${t}%` : `$${t}`, s = (t, e = "en-US") => {
15
15
  const r = t.toLocaleString(e, {
16
16
  minimumFractionDigits: 2,
17
17
  maximumFractionDigits: 2
@@ -75,25 +75,26 @@ const c = (t) => t.charAt(0).toLocaleUpperCase() + t.slice(1), S = ({
75
75
  function z(t) {
76
76
  return t ? { __html: m.sanitize(t, h) } : { __html: "" };
77
77
  }
78
- const g = (t) => t.replace(/\D/g, ""), P = (t) => t.replace(/\.value$/, ""), T = (t) => t.replace(/_([a-z])/g, (e, r) => r.toUpperCase()), U = (t) => {
78
+ const g = (t) => t.replace(/\D/g, ""), P = (t) => t.replace(/^(-?)0+(?=\d)/, "$1"), T = (t) => t.replace(/\.value$/, ""), U = (t) => t.replace(/_([a-z])/g, (e, r) => r.toUpperCase()), W = (t) => {
79
79
  if (!t) return "";
80
80
  const e = g(String(t));
81
81
  return e.length === 10 ? `${e.slice(0, 3)}-${e.slice(3, 6)}-${e.slice(6)}` : e.length === 11 && e.startsWith("1") ? `${e.slice(1, 4)}-${e.slice(4, 7)}-${e.slice(7)}` : e || "";
82
82
  };
83
83
  export {
84
- L as addressInline,
84
+ D as addressInline,
85
85
  z as createMarkup,
86
86
  S as firstLastName,
87
87
  $ as formatCompensationRate,
88
88
  s as formatNumberAsCurrency,
89
89
  A as formatPayRate,
90
- U as formatPhoneNumber,
91
- D as formatStreetForDisplay,
90
+ W as formatPhoneNumber,
91
+ L as formatStreetForDisplay,
92
92
  y as getCityStateZip,
93
93
  p as getStreet,
94
- P as normalizeErrorKeyForForm,
94
+ T as normalizeErrorKeyForForm,
95
95
  g as removeNonDigits,
96
- T as snakeCaseToCamelCase,
96
+ U as snakeCaseToCamelCase,
97
+ P as stripLeadingZeros,
97
98
  b as useFormatCompensationRate
98
99
  };
99
100
  //# sourceMappingURL=formattedStrings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formattedStrings.js","sources":["../../src/helpers/formattedStrings.ts"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport { type TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useCallback } from 'react'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\n\nconst capitalize = (word: string) => word.charAt(0).toLocaleUpperCase() + word.slice(1)\n\n/**\n * Joins a first, middle initial, and last name into a single capitalized display string.\n *\n * @remarks Each name part is capitalized at its first character. A space is\n * inserted before the middle initial and last name only when that part is\n * present. Missing parts are treated as empty.\n *\n * @param name - Object with optional `first_name`, `middle_initial`, and `last_name` fields.\n * @returns The combined name, e.g. `Jane M Doe`, `Jane Doe`, `Jane`, or `''`.\n * @internal\n */\nexport const firstLastName = ({\n first_name,\n middle_initial,\n last_name,\n}: {\n first_name?: string | null\n middle_initial?: string | null\n last_name?: string | null\n}) =>\n `${first_name ? capitalize(first_name) : ''}${middle_initial ? maybeString(capitalize(middle_initial)) : ''}${last_name ? maybeString(capitalize(last_name)) : ''}`\n\nconst maybeString = (str: string | null | undefined) => {\n return str ? ` ${str}` : ''\n}\n\n/**\n * Combines an address's two street lines with a comma separator.\n *\n * @remarks Each line is prefixed with a leading space when present, producing\n * a string like ` 123 Main St, Apt 4`. Prefer {@link formatStreetForDisplay}\n * for new display code; this function is retained for legacy callers.\n *\n * @param address - Address whose `street1` and `street2` are joined.\n * @returns The joined street string.\n * @internal\n */\nexport const getStreet = (address: EmployeeAddress | Location) => {\n const street1 = maybeString(address.street1)\n const street2 = maybeString(address.street2)\n\n return `${street1},${street2}`\n}\n\n/**\n * Joins an address's street lines with a comma for display.\n *\n * @remarks Trims each line and skips empty values, avoiding the leading-space\n * and trailing-comma artifacts of {@link getStreet}.\n *\n * @param address - Address whose `street1` and `street2` are joined.\n * @returns The display-formatted street string, e.g. `123 Main St, Apt 4`.\n * @internal\n */\nexport const formatStreetForDisplay = (address: EmployeeAddress | Location) => {\n const parts = [address.street1?.trim(), address.street2?.trim()].filter((part): part is string =>\n Boolean(part),\n )\n return parts.join(', ')\n}\n\n/**\n * Formats an address's city, state, and zip into a single display string.\n *\n * @param address - Address whose `city`, `state`, and `zip` are joined.\n * @returns A `City, State Zip` string. Empty fields are skipped.\n * @internal\n */\nexport const getCityStateZip = (address: EmployeeAddress | Location) =>\n `${maybeString(address.city)}, ${maybeString(address.state)} ${maybeString(address.zip)}`\n\n/**\n * Formats a full address as a single inline string.\n *\n * @param address - The address to format.\n * @returns The combined street and city/state/zip string.\n * @internal\n */\nexport const addressInline = (address: EmployeeAddress | Location) =>\n `${getStreet(address)} ${getCityStateZip(address)}`\n\n/**\n * Wraps an amount string with a currency or percent symbol.\n *\n * @param amount - Pre-formatted numeric string.\n * @param isPercentage - When `true`, appends `%`; otherwise prepends `$`.\n * @returns The amount with the appropriate symbol.\n * @internal\n */\nconst amountStr = (amount: string, isPercentage: boolean) =>\n isPercentage ? `${amount}%` : `$${amount}`\n\n/**\n * Formats a number as a USD currency string with two decimal places.\n *\n * @param amount - The numeric value to format.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleString`.\n * Defaults to `en-US`.\n * @returns A `$1,234.56` style currency string.\n * @internal\n */\nexport const formatNumberAsCurrency = (amount: number, locale: string = 'en-US') => {\n const formattedNumber = amount.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n })\n return amountStr(formattedNumber, false)\n}\n\n/**\n * Formats a pay rate with its payment unit, annualizing weekly and monthly values.\n *\n * @remarks Hourly, yearly, and paycheck rates are displayed at the input\n * value. Weekly rates are multiplied by 52 and monthly rates by 12 to express\n * an annualized amount. Unknown payment units render as the currency value\n * alone.\n *\n * @param args - Formatting inputs: `rate` (numeric value), `paymentUnit`\n * (`Hour`, `Week`, `Month`, `Year`, or `Paycheck`), `t` (i18next translation\n * function), and optional `locale` (BCP 47 tag, default `en-US`).\n * @returns The translated, formatted pay rate string.\n * @internal\n */\nexport const formatPayRate = ({\n rate,\n paymentUnit,\n t,\n locale = 'en-US',\n}: {\n rate: number\n paymentUnit: string\n t: TFunction\n locale?: string\n}) => {\n const amount = formatNumberAsCurrency(rate, locale)\n\n switch (paymentUnit) {\n case 'Hour':\n return t('payRateFormats.hourly', { amount, ns: 'common' })\n case 'Week':\n return t('payRateFormats.weekly', {\n amount: formatNumberAsCurrency(rate * 52, locale),\n ns: 'common',\n })\n case 'Month':\n return t('payRateFormats.monthly', {\n amount: formatNumberAsCurrency(rate * 12, locale),\n ns: 'common',\n })\n case 'Year':\n return t('payRateFormats.yearly', { amount, ns: 'common' })\n case 'Paycheck':\n return t('payRateFormats.paycheck', { amount, ns: 'common' })\n default:\n return amount\n }\n}\n\n/**\n * Formats a compensation rate as-is, without annualizing weekly or monthly values.\n *\n * @remarks Use for displaying compensation card data where the stored rate\n * should be shown directly (e.g. `$950 per week`, `$3,500 per month`).\n * Unknown payment units render as the currency value alone.\n *\n * @param args - Formatting inputs: `rate` (numeric value), `paymentUnit`\n * (`Hour`, `Week`, `Month`, `Year`, or `Paycheck`), `t` (i18next translation\n * function), and optional `locale` (BCP 47 tag, default `en-US`).\n * @returns The translated, formatted compensation rate string.\n * @internal\n */\nexport const formatCompensationRate = ({\n rate,\n paymentUnit,\n t,\n locale = 'en-US',\n}: {\n rate: number\n paymentUnit: string\n t: TFunction\n locale?: string\n}) => {\n const amount = formatNumberAsCurrency(rate, locale)\n\n switch (paymentUnit) {\n case 'Hour':\n return t('compensationRateFormats.hourly', { amount, ns: 'common' })\n case 'Week':\n return t('compensationRateFormats.weekly', { amount, ns: 'common' })\n case 'Month':\n return t('compensationRateFormats.monthly', { amount, ns: 'common' })\n case 'Year':\n return t('compensationRateFormats.yearly', { amount, ns: 'common' })\n case 'Paycheck':\n return t('compensationRateFormats.paycheck', { amount, ns: 'common' })\n default:\n return amount\n }\n}\n\n/**\n * Hook that returns a memoized {@link formatCompensationRate} bound to the active locale.\n *\n * @returns A callback `(rate, paymentUnit) => string`.\n * @internal\n */\nexport const useFormatCompensationRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (rate: number, paymentUnit: string) => {\n return formatCompensationRate({ rate, paymentUnit, t, locale })\n },\n [t, locale],\n )\n}\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['href', 'target'] }\n/**\n * Sanitizes an HTML string for use with React's `dangerouslySetInnerHTML`.\n *\n * @remarks Only `<a>`, `<b>`, and `<strong>` tags are allowed, and `<a>`\n * elements may retain only `href` and `target` attributes. All other markup\n * is stripped via DOMPurify.\n *\n * @param dirty - The raw HTML string to sanitize.\n * @returns An object shaped for `dangerouslySetInnerHTML`. The `__html`\n * field is `''` when the input is empty.\n * @internal\n */\nexport function createMarkup(dirty: string) {\n if (!dirty) return { __html: '' }\n return { __html: DOMPurify.sanitize(dirty, dompurifyConfig) }\n}\n\n/**\n * Removes all non-digit characters from a string.\n *\n * @param value - The string to filter.\n * @returns The input with only the digit characters `0`–`9` retained.\n * @internal\n */\nexport const removeNonDigits = (value: string): string => {\n return value.replace(/\\D/g, '')\n}\n\n/**\n * Strips the trailing `.value` segment from an API error path.\n *\n * @remarks API validation errors target a `.value` field on the inner\n * object, but react-hook-form registers the field under its bare name.\n * Stripping `.value` aligns the error path with the form field name.\n *\n * @param errorKey - The dotted error path returned by the API.\n * @returns The error key without a trailing `.value`.\n * @internal\n */\nexport const normalizeErrorKeyForForm = (errorKey: string): string =>\n errorKey.replace(/\\.value$/, '')\n\n/**\n * Converts a `snake_case` string to `camelCase`.\n *\n * @param s - The snake_case string to convert.\n * @returns The camelCase equivalent.\n * @internal\n */\nexport const snakeCaseToCamelCase = (s: string) => {\n return s.replace(/_([a-z])/g, (_: string, char: string) => char.toUpperCase())\n}\n\n/**\n * Converts a `camelCase` or `PascalCase` string to `snake_case`.\n *\n * @remarks Handles consecutive uppercase letters by inserting a separator\n * before the final letter of a run that is followed by a lowercase letter\n * (e.g. `HTMLParser` becomes `html_parser`).\n *\n * @param s - The camelCase or PascalCase string to convert.\n * @returns The snake_case equivalent in lower case.\n * @internal\n */\nexport const camelCaseToSnakeCase = (s: string) => {\n return s\n .replace(\n /([a-z0-9])([A-Z])/g,\n (_: string, group1: string, group2: string) => `${group1}_${group2.toLowerCase()}`,\n )\n .replace(\n /([A-Z])([A-Z])(?=[a-z])/g,\n (_: string, group1: string, group2: string) =>\n `${group1.toLowerCase()}_${group2.toLowerCase()}`,\n )\n .toLowerCase()\n}\n\n/**\n * Formats a US phone number as `NNN-NNN-NNNN` for display.\n *\n * @remarks Strips non-digit characters before formatting. A leading `1`\n * country code on 11-digit inputs is dropped. Inputs that are not 10 or 11\n * digits are returned as the raw digit string. Returns an empty string for\n * nullish input.\n *\n * @param phoneNumber - The phone number to format.\n * @returns The formatted phone number, the digit-only fallback, or `''`.\n * @internal\n */\nexport const formatPhoneNumber = (phoneNumber: string | number | null | undefined): string => {\n if (!phoneNumber) return ''\n\n const digits = removeNonDigits(String(phoneNumber))\n\n if (digits.length === 10) {\n return `${digits.slice(0, 3)}-${digits.slice(3, 6)}-${digits.slice(6)}`\n }\n\n if (digits.length === 11 && digits.startsWith('1')) {\n return `${digits.slice(1, 4)}-${digits.slice(4, 7)}-${digits.slice(7)}`\n }\n\n return digits || ''\n}\n"],"names":["capitalize","word","firstLastName","first_name","middle_initial","last_name","maybeString","str","getStreet","address","street1","street2","formatStreetForDisplay","part","getCityStateZip","addressInline","amountStr","amount","isPercentage","formatNumberAsCurrency","locale","formattedNumber","formatPayRate","rate","paymentUnit","t","formatCompensationRate","useFormatCompensationRate","useTranslation","useLocale","useCallback","dompurifyConfig","createMarkup","dirty","DOMPurify","removeNonDigits","value","normalizeErrorKeyForForm","errorKey","snakeCaseToCamelCase","s","_","char","formatPhoneNumber","phoneNumber","digits"],"mappings":";;;;AAQA,MAAMA,IAAa,CAACC,MAAiBA,EAAK,OAAO,CAAC,EAAE,sBAAsBA,EAAK,MAAM,CAAC,GAazEC,IAAgB,CAAC;AAAA,EAC5B,YAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AACF,MAKE,GAAGF,IAAaH,EAAWG,CAAU,IAAI,EAAE,GAAGC,IAAiBE,EAAYN,EAAWI,CAAc,CAAC,IAAI,EAAE,GAAGC,IAAYC,EAAYN,EAAWK,CAAS,CAAC,IAAI,EAAE,IAE7JC,IAAc,CAACC,MACZA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Ae;AAC1C,SAAKA,IACE,EAAE,QAAQC,EAAU,SAASD,GAAOF,CAAe,EAAA,IADvC,EAAE,QAAQ,GAAA;AAE/B;AASO,MAAMI,IAAkB,CAACC,MACvBA,EAAM,QAAQ,OAAO,EAAE,GAcnBC,IAA2B,CAACC,MACvCA,EAAS,QAAQ,YAAY,EAAE,GASpBC,IAAuB,CAACC,MAC5BA,EAAE,QAAQ,aAAa,CAACC,GAAWC,MAAiBA,EAAK,aAAa,GAwClEC,IAAoB,CAACC,MAA4D;AAC5F,MAAI,CAACA,EAAa,QAAO;AAEzB,QAAMC,IAASV,EAAgB,OAAOS,CAAW,CAAC;AAElD,SAAIC,EAAO,WAAW,KACb,GAAGA,EAAO,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAO,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAO,MAAM,CAAC,CAAC,KAGnEA,EAAO,WAAW,MAAMA,EAAO,WAAW,GAAG,IACxC,GAAGA,EAAO,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAO,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAO,MAAM,CAAC,CAAC,KAGhEA,KAAU;AACnB;"}
1
+ {"version":3,"file":"formattedStrings.js","sources":["../../src/helpers/formattedStrings.ts"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\nimport { type TFunction } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useCallback } from 'react'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\n\nconst capitalize = (word: string) => word.charAt(0).toLocaleUpperCase() + word.slice(1)\n\n/**\n * Joins a first, middle initial, and last name into a single capitalized display string.\n *\n * @remarks Each name part is capitalized at its first character. A space is\n * inserted before the middle initial and last name only when that part is\n * present. Missing parts are treated as empty.\n *\n * @param name - Object with optional `first_name`, `middle_initial`, and `last_name` fields.\n * @returns The combined name, e.g. `Jane M Doe`, `Jane Doe`, `Jane`, or `''`.\n * @internal\n */\nexport const firstLastName = ({\n first_name,\n middle_initial,\n last_name,\n}: {\n first_name?: string | null\n middle_initial?: string | null\n last_name?: string | null\n}) =>\n `${first_name ? capitalize(first_name) : ''}${middle_initial ? maybeString(capitalize(middle_initial)) : ''}${last_name ? maybeString(capitalize(last_name)) : ''}`\n\nconst maybeString = (str: string | null | undefined) => {\n return str ? ` ${str}` : ''\n}\n\n/**\n * Combines an address's two street lines with a comma separator.\n *\n * @remarks Each line is prefixed with a leading space when present, producing\n * a string like ` 123 Main St, Apt 4`. Prefer {@link formatStreetForDisplay}\n * for new display code; this function is retained for legacy callers.\n *\n * @param address - Address whose `street1` and `street2` are joined.\n * @returns The joined street string.\n * @internal\n */\nexport const getStreet = (address: EmployeeAddress | Location) => {\n const street1 = maybeString(address.street1)\n const street2 = maybeString(address.street2)\n\n return `${street1},${street2}`\n}\n\n/**\n * Joins an address's street lines with a comma for display.\n *\n * @remarks Trims each line and skips empty values, avoiding the leading-space\n * and trailing-comma artifacts of {@link getStreet}.\n *\n * @param address - Address whose `street1` and `street2` are joined.\n * @returns The display-formatted street string, e.g. `123 Main St, Apt 4`.\n * @internal\n */\nexport const formatStreetForDisplay = (address: EmployeeAddress | Location) => {\n const parts = [address.street1?.trim(), address.street2?.trim()].filter((part): part is string =>\n Boolean(part),\n )\n return parts.join(', ')\n}\n\n/**\n * Formats an address's city, state, and zip into a single display string.\n *\n * @param address - Address whose `city`, `state`, and `zip` are joined.\n * @returns A `City, State Zip` string. Empty fields are skipped.\n * @internal\n */\nexport const getCityStateZip = (address: EmployeeAddress | Location) =>\n `${maybeString(address.city)}, ${maybeString(address.state)} ${maybeString(address.zip)}`\n\n/**\n * Formats a full address as a single inline string.\n *\n * @param address - The address to format.\n * @returns The combined street and city/state/zip string.\n * @internal\n */\nexport const addressInline = (address: EmployeeAddress | Location) =>\n `${getStreet(address)} ${getCityStateZip(address)}`\n\n/**\n * Wraps an amount string with a currency or percent symbol.\n *\n * @param amount - Pre-formatted numeric string.\n * @param isPercentage - When `true`, appends `%`; otherwise prepends `$`.\n * @returns The amount with the appropriate symbol.\n * @internal\n */\nconst amountStr = (amount: string, isPercentage: boolean) =>\n isPercentage ? `${amount}%` : `$${amount}`\n\n/**\n * Formats a number as a USD currency string with two decimal places.\n *\n * @param amount - The numeric value to format.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleString`.\n * Defaults to `en-US`.\n * @returns A `$1,234.56` style currency string.\n * @internal\n */\nexport const formatNumberAsCurrency = (amount: number, locale: string = 'en-US') => {\n const formattedNumber = amount.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n })\n return amountStr(formattedNumber, false)\n}\n\n/**\n * Formats a pay rate with its payment unit, annualizing weekly and monthly values.\n *\n * @remarks Hourly, yearly, and paycheck rates are displayed at the input\n * value. Weekly rates are multiplied by 52 and monthly rates by 12 to express\n * an annualized amount. Unknown payment units render as the currency value\n * alone.\n *\n * @param args - Formatting inputs: `rate` (numeric value), `paymentUnit`\n * (`Hour`, `Week`, `Month`, `Year`, or `Paycheck`), `t` (i18next translation\n * function), and optional `locale` (BCP 47 tag, default `en-US`).\n * @returns The translated, formatted pay rate string.\n * @internal\n */\nexport const formatPayRate = ({\n rate,\n paymentUnit,\n t,\n locale = 'en-US',\n}: {\n rate: number\n paymentUnit: string\n t: TFunction\n locale?: string\n}) => {\n const amount = formatNumberAsCurrency(rate, locale)\n\n switch (paymentUnit) {\n case 'Hour':\n return t('payRateFormats.hourly', { amount, ns: 'common' })\n case 'Week':\n return t('payRateFormats.weekly', {\n amount: formatNumberAsCurrency(rate * 52, locale),\n ns: 'common',\n })\n case 'Month':\n return t('payRateFormats.monthly', {\n amount: formatNumberAsCurrency(rate * 12, locale),\n ns: 'common',\n })\n case 'Year':\n return t('payRateFormats.yearly', { amount, ns: 'common' })\n case 'Paycheck':\n return t('payRateFormats.paycheck', { amount, ns: 'common' })\n default:\n return amount\n }\n}\n\n/**\n * Formats a compensation rate as-is, without annualizing weekly or monthly values.\n *\n * @remarks Use for displaying compensation card data where the stored rate\n * should be shown directly (e.g. `$950 per week`, `$3,500 per month`).\n * Unknown payment units render as the currency value alone.\n *\n * @param args - Formatting inputs: `rate` (numeric value), `paymentUnit`\n * (`Hour`, `Week`, `Month`, `Year`, or `Paycheck`), `t` (i18next translation\n * function), and optional `locale` (BCP 47 tag, default `en-US`).\n * @returns The translated, formatted compensation rate string.\n * @internal\n */\nexport const formatCompensationRate = ({\n rate,\n paymentUnit,\n t,\n locale = 'en-US',\n}: {\n rate: number\n paymentUnit: string\n t: TFunction\n locale?: string\n}) => {\n const amount = formatNumberAsCurrency(rate, locale)\n\n switch (paymentUnit) {\n case 'Hour':\n return t('compensationRateFormats.hourly', { amount, ns: 'common' })\n case 'Week':\n return t('compensationRateFormats.weekly', { amount, ns: 'common' })\n case 'Month':\n return t('compensationRateFormats.monthly', { amount, ns: 'common' })\n case 'Year':\n return t('compensationRateFormats.yearly', { amount, ns: 'common' })\n case 'Paycheck':\n return t('compensationRateFormats.paycheck', { amount, ns: 'common' })\n default:\n return amount\n }\n}\n\n/**\n * Hook that returns a memoized {@link formatCompensationRate} bound to the active locale.\n *\n * @returns A callback `(rate, paymentUnit) => string`.\n * @internal\n */\nexport const useFormatCompensationRate = () => {\n const { t } = useTranslation('common')\n const { locale } = useLocale()\n\n return useCallback(\n (rate: number, paymentUnit: string) => {\n return formatCompensationRate({ rate, paymentUnit, t, locale })\n },\n [t, locale],\n )\n}\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['href', 'target'] }\n/**\n * Sanitizes an HTML string for use with React's `dangerouslySetInnerHTML`.\n *\n * @remarks Only `<a>`, `<b>`, and `<strong>` tags are allowed, and `<a>`\n * elements may retain only `href` and `target` attributes. All other markup\n * is stripped via DOMPurify.\n *\n * @param dirty - The raw HTML string to sanitize.\n * @returns An object shaped for `dangerouslySetInnerHTML`. The `__html`\n * field is `''` when the input is empty.\n * @internal\n */\nexport function createMarkup(dirty: string) {\n if (!dirty) return { __html: '' }\n return { __html: DOMPurify.sanitize(dirty, dompurifyConfig) }\n}\n\n/**\n * Removes all non-digit characters from a string.\n *\n * @param value - The string to filter.\n * @returns The input with only the digit characters `0`–`9` retained.\n * @internal\n */\nexport const removeNonDigits = (value: string): string => {\n return value.replace(/\\D/g, '')\n}\n\n/**\n * Removes redundant leading zeros from a numeric input string.\n *\n * @remarks Intended as a `transform` for controlled `type=\"number\"` text\n * fields, which store their value verbatim. Several payroll inputs are\n * seeded with `\"0\"`, so typing into one without clearing it would otherwise\n * leave a value like `\"05\"`. Only zeros immediately followed by another\n * digit are stripped, so `\"0\"`, `\"0.5\"`, and an empty string are preserved,\n * and any leading sign is retained (`\"-05\"` becomes `\"-5\"`).\n *\n * @param value - The raw input string.\n * @returns The input with redundant leading zeros removed.\n * @internal\n */\nexport const stripLeadingZeros = (value: string): string => value.replace(/^(-?)0+(?=\\d)/, '$1')\n\n/**\n * Strips the trailing `.value` segment from an API error path.\n *\n * @remarks API validation errors target a `.value` field on the inner\n * object, but react-hook-form registers the field under its bare name.\n * Stripping `.value` aligns the error path with the form field name.\n *\n * @param errorKey - The dotted error path returned by the API.\n * @returns The error key without a trailing `.value`.\n * @internal\n */\nexport const normalizeErrorKeyForForm = (errorKey: string): string =>\n errorKey.replace(/\\.value$/, '')\n\n/**\n * Converts a `snake_case` string to `camelCase`.\n *\n * @param s - The snake_case string to convert.\n * @returns The camelCase equivalent.\n * @internal\n */\nexport const snakeCaseToCamelCase = (s: string) => {\n return s.replace(/_([a-z])/g, (_: string, char: string) => char.toUpperCase())\n}\n\n/**\n * Converts a `camelCase` or `PascalCase` string to `snake_case`.\n *\n * @remarks Handles consecutive uppercase letters by inserting a separator\n * before the final letter of a run that is followed by a lowercase letter\n * (e.g. `HTMLParser` becomes `html_parser`).\n *\n * @param s - The camelCase or PascalCase string to convert.\n * @returns The snake_case equivalent in lower case.\n * @internal\n */\nexport const camelCaseToSnakeCase = (s: string) => {\n return s\n .replace(\n /([a-z0-9])([A-Z])/g,\n (_: string, group1: string, group2: string) => `${group1}_${group2.toLowerCase()}`,\n )\n .replace(\n /([A-Z])([A-Z])(?=[a-z])/g,\n (_: string, group1: string, group2: string) =>\n `${group1.toLowerCase()}_${group2.toLowerCase()}`,\n )\n .toLowerCase()\n}\n\n/**\n * Formats a US phone number as `NNN-NNN-NNNN` for display.\n *\n * @remarks Strips non-digit characters before formatting. A leading `1`\n * country code on 11-digit inputs is dropped. Inputs that are not 10 or 11\n * digits are returned as the raw digit string. Returns an empty string for\n * nullish input.\n *\n * @param phoneNumber - The phone number to format.\n * @returns The formatted phone number, the digit-only fallback, or `''`.\n * @internal\n */\nexport const formatPhoneNumber = (phoneNumber: string | number | null | undefined): string => {\n if (!phoneNumber) return ''\n\n const digits = removeNonDigits(String(phoneNumber))\n\n if (digits.length === 10) {\n return `${digits.slice(0, 3)}-${digits.slice(3, 6)}-${digits.slice(6)}`\n }\n\n if (digits.length === 11 && digits.startsWith('1')) {\n return `${digits.slice(1, 4)}-${digits.slice(4, 7)}-${digits.slice(7)}`\n }\n\n return digits || ''\n}\n"],"names":["capitalize","word","firstLastName","first_name","middle_initial","last_name","maybeString","str","getStreet","address","street1","street2","formatStreetForDisplay","part","getCityStateZip","addressInline","amountStr","amount","isPercentage","formatNumberAsCurrency","locale","formattedNumber","formatPayRate","rate","paymentUnit","t","formatCompensationRate","useFormatCompensationRate","useTranslation","useLocale","useCallback","dompurifyConfig","createMarkup","dirty","DOMPurify","removeNonDigits","value","stripLeadingZeros","normalizeErrorKeyForForm","errorKey","snakeCaseToCamelCase","s","_","char","formatPhoneNumber","phoneNumber","digits"],"mappings":";;;;AAQA,MAAMA,IAAa,CAACC,MAAiBA,EAAK,OAAO,CAAC,EAAE,sBAAsBA,EAAK,MAAM,CAAC,GAazEC,IAAgB,CAAC;AAAA,EAC5B,YAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAC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G,QAAAJ,GAAQ;AAAA,IAEhE,CAAC,GAAGA,CAAM;AAAA,EAAA;AAEd,GAEMW,IAAkB,EAAE,cAAc,CAAC,KAAK,KAAK,QAAQ,GAAG,cAAc,CAAC,QAAQ,QAAQ,EAAA;AAatF,SAASC,EAAaC,GAAe;AAC1C,SAAKA,IACE,EAAE,QAAQC,EAAU,SAASD,GAAOF,CAAe,EAAA,IADvC,EAAE,QAAQ,GAAA;AAE/B;AASO,MAAMI,IAAkB,CAACC,MACvBA,EAAM,QAAQ,OAAO,EAAE,GAiBnBC,IAAoB,CAACD,MAA0BA,EAAM,QAAQ,iBAAiB,IAAI,GAalFE,IAA2B,CAACC,MACvCA,EAAS,QAAQ,YAAY,EAAE,GASpBC,IAAuB,CAACC,MAC5BA,EAAE,QAAQ,aAAa,CAACC,GAAWC,MAAiBA,EAAK,aAAa,GAwClEC,IAAoB,CAACC,MAA4D;AAC5F,MAAI,CAACA,EAAa,QAAO;AAEzB,QAAMC,IAASX,EAAgB,OAAOU,CAAW,CAAC;AAElD,SAAIC,EAAO,WAAW,KACb,GAAGA,EAAO,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAO,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAO,MAAM,CAAC,CAAC,KAGnEA,EAAO,WAAW,MAAMA,EAAO,WAAW,GAAG,IACxC,GAAGA,EAAO,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAO,MAAM,GAAG,CAAC,CAAC,IAAIA,EAAO,MAAM,CAAC,CAAC,KAGhEA,KAAU;AACnB;"}
package/dist/i18n/I18n.js CHANGED
@@ -8,6 +8,8 @@ const j = "common", i = /* @__PURE__ */ Object.assign({
8
8
  "./en/Company.FederalTaxes.json": () => import("./en/Company.FederalTaxes.json.js").then((e) => e.default),
9
9
  "./en/Company.Industry.json": () => import("./en/Company.Industry.json.js").then((e) => e.default),
10
10
  "./en/Company.Locations.json": () => import("./en/Company.Locations.json.js").then((e) => e.default),
11
+ "./en/Company.Management.PaySchedule.json": () => import("./en/Company.Management.PaySchedule.json.js").then((e) => e.default),
12
+ "./en/Company.Management.PayScheduleAssignment.json": () => import("./en/Company.Management.PayScheduleAssignment.json.js").then((e) => e.default),
11
13
  "./en/Company.OnboardingOverview.json": () => import("./en/Company.OnboardingOverview.json.js").then((e) => e.default),
12
14
  "./en/Company.PaySchedule.json": () => import("./en/Company.PaySchedule.json.js").then((e) => e.default),
13
15
  "./en/Company.SignatureForm.json": () => import("./en/Company.SignatureForm.json.js").then((e) => e.default),
@@ -1 +1 @@
1
- {"version":3,"file":"I18n.js","sources":["../../src/i18n/I18n.ts"],"sourcesContent":["/// <reference types=\"vite/client\" />\nimport { useTranslation } from 'react-i18next'\nimport type { CustomTypeOptions } from 'i18next'\nimport type { Resources } from './types'\nimport { LRUCache } from '@/helpers/LRUCache'\nimport type { ResourceDictionary } from '@/types/Helpers'\n\n/** @internal */\nexport const defaultNS = 'common'\n\nconst translationLoaders = import.meta.glob<Record<string, string>>('./*/*.json', {\n import: 'default',\n})\n\nfunction resolveTranslationLoader(lng: string | undefined, ns: string) {\n const language = lng ?? 'en'\n const primaryPath = `./${language}/${ns}.json`\n const load =\n translationLoaders[primaryPath as keyof typeof translationLoaders] ??\n translationLoaders[`./en/${ns}.json` as keyof typeof translationLoaders]\n return load\n}\n\n//LRU cache holding requested resources\nconst resourceCache = new LRUCache(50)\n/**\n * Dynamic loading of translation resources - works with Suspence to prevent early access to loadable strings\n *\n * @param lng - resource language\n * @param ns - Namespace/name of the component/resource\n * @returns translation resource\n */\nconst loadResource = ({ lng = 'en', ns }: { ns: string; lng?: string }) => {\n let isLoading = true\n let isError = false\n let resource: Record<string, string>\n\n const importResources = async () => {\n try {\n const load = resolveTranslationLoader(lng, ns)\n if (!load) {\n isError = true\n isLoading = false\n return\n }\n resource = await load()\n isLoading = false\n } catch {\n isError = true\n isLoading = false\n }\n }\n const promise = importResources()\n return () => {\n if (isLoading) {\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw promise // Throw the promise to indicate Suspense should suspend.\n } else if (isError) {\n throw new Error(`Error loading translation for component: ${ns}`) // Handle error\n } else {\n return resource // Return the resource when loading is complete\n }\n }\n}\n\n/**\n * Hook that allows component to load custom dictionary\n *\n * @param ns - Namespace - should match component name exactly - not exposed to consumers\n * @internal\n */\nexport const useI18n = (\n namespaces:\n keyof CustomTypeOptions['resources'] | Array<keyof CustomTypeOptions['resources']> | null,\n) => {\n //Getting our instance of i18n -> supplied by the provider set in GustoProvider\n const { i18n: i18nInstance } = useTranslation()\n //Abort when namespace is not provided\n if (!namespaces) return\n const nsMap = Array.isArray(namespaces) ? namespaces : [namespaces]\n for (const ns of nsMap) {\n // `language` (the requested language) rather than `resolvedLanguage` (the language i18next has\n // already loaded translations for) - resolvedLanguage stays pinned to whatever language already\n // has resources (typically 'en', preloaded in SDKI18next) until a resource bundle is registered\n // under the newly requested language, which is exactly what this loop is trying to do.\n const key = `${i18nInstance.language}:${ns}`\n //Skip loading default resource if it is already in cache\n if (resourceCache.get(key) === null) {\n //If resource not in cache, initiate loading and add getter to cache\n resourceCache.put(key, loadResource({ lng: i18nInstance.language, ns: ns }))\n }\n //Get resourceGetter from cache\n const resourceGetter = resourceCache.get(key)\n if (resourceGetter) {\n const resource = resourceGetter()\n i18nInstance.addResourceBundle(i18nInstance.language, ns, resource, true, false) //Last argument is set to false to prevent override of keys provided by partners on GustoProvider level through dictionary prop\n }\n }\n}\n\n/**\n * Used by individual components to override their dictionaries with partner provided resources\n *\n * @internal\n */\nexport const useComponentDictionary = <K extends keyof Resources>(\n ns: K,\n resource?: ResourceDictionary<K> | null,\n) => {\n const { i18n: i18nInstance } = useTranslation()\n if (resource) {\n for (const lang in resource) {\n i18nInstance.addResourceBundle(lang, ns, resource[lang], true, true)\n }\n }\n}\n"],"names":["defaultNS","translationLoaders","m","resolveTranslationLoader","lng","ns","primaryPath","resourceCache","LRUCache","loadResource","isLoading","isError","resource","promise","load","useI18n","namespaces","i18nInstance","useTranslation","nsMap","key","resource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EAAa,QAAQ,IAAIZ,CAAE;AAE1C,IAAIE,EAAc,IAAIa,CAAG,MAAM,QAE7Bb,EAAc,IAAIa,GAAKX,EAAa,EAAE,KAAKQ,EAAa,UAAU,IAAAZ,EAAA,CAAQ,CAAC;AAG7E,UAAMgB,IAAiBd,EAAc,IAAIa,CAAG;AAC5C,QAAIC,GAAgB;AAClB,YAAMT,IAAWS,EAAA;AACjB,MAAAJ,EAAa,kBAAkBA,EAAa,UAAUZ,GAAIO,GAAU,IAAM,EAAK;AAAA,IACjF;AAAA,EACF;AACF,GAOaU,IAAyB,CACpCjB,GACAO,MACG;AACH,QAAM,EAAE,MAAMK,EAAA,IAAiBC,EAAA;AAC/B,MAAIN;AACF,eAAWW,KAAQX;AACjB,MAAAK,EAAa,kBAAkBM,GAAMlB,GAAIO,EAASW,CAAI,GAAG,IAAM,EAAI;AAGzE;"}
1
+ {"version":3,"file":"I18n.js","sources":["../../src/i18n/I18n.ts"],"sourcesContent":["/// <reference types=\"vite/client\" />\nimport { useTranslation } from 'react-i18next'\nimport type { CustomTypeOptions } from 'i18next'\nimport type { Resources } from './types'\nimport { LRUCache } from '@/helpers/LRUCache'\nimport type { ResourceDictionary } from '@/types/Helpers'\n\n/** @internal */\nexport const defaultNS = 'common'\n\nconst translationLoaders = import.meta.glob<Record<string, string>>('./*/*.json', {\n import: 'default',\n})\n\nfunction resolveTranslationLoader(lng: string | undefined, ns: string) {\n const language = lng ?? 'en'\n const primaryPath = `./${language}/${ns}.json`\n const load =\n translationLoaders[primaryPath as keyof typeof translationLoaders] ??\n translationLoaders[`./en/${ns}.json` as keyof typeof translationLoaders]\n return load\n}\n\n//LRU cache holding requested resources\nconst resourceCache = new LRUCache(50)\n/**\n * Dynamic loading of translation resources - works with Suspence to prevent early access to loadable strings\n *\n * @param lng - resource language\n * @param ns - Namespace/name of the component/resource\n * @returns translation resource\n */\nconst loadResource = ({ lng = 'en', ns }: { ns: string; lng?: string }) => {\n let isLoading = true\n let isError = false\n let resource: Record<string, string>\n\n const importResources = async () => {\n try {\n const load = resolveTranslationLoader(lng, ns)\n if (!load) {\n isError = true\n isLoading = false\n return\n }\n resource = await load()\n isLoading = false\n } catch {\n isError = true\n isLoading = false\n }\n }\n const promise = importResources()\n return () => {\n if (isLoading) {\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw promise // Throw the promise to indicate Suspense should suspend.\n } else if (isError) {\n throw new Error(`Error loading translation for component: ${ns}`) // Handle error\n } else {\n return resource // Return the resource when loading is complete\n }\n }\n}\n\n/**\n * Hook that allows component to load custom dictionary\n *\n * @param ns - Namespace - should match component name exactly - not exposed to consumers\n * @internal\n */\nexport const useI18n = (\n namespaces:\n keyof CustomTypeOptions['resources'] | Array<keyof CustomTypeOptions['resources']> | null,\n) => {\n //Getting our instance of i18n -> supplied by the provider set in GustoProvider\n const { i18n: i18nInstance } = useTranslation()\n //Abort when namespace is not provided\n if (!namespaces) return\n const nsMap = Array.isArray(namespaces) ? namespaces : [namespaces]\n for (const ns of nsMap) {\n // `language` (the requested language) rather than `resolvedLanguage` (the language i18next has\n // already loaded translations for) - resolvedLanguage stays pinned to whatever language already\n // has resources (typically 'en', preloaded in SDKI18next) until a resource bundle is registered\n // under the newly requested language, which is exactly what this loop is trying to do.\n const key = `${i18nInstance.language}:${ns}`\n //Skip loading default resource if it is already in cache\n if (resourceCache.get(key) === null) {\n //If resource not in cache, initiate loading and add getter to cache\n resourceCache.put(key, loadResource({ lng: i18nInstance.language, ns: ns }))\n }\n //Get resourceGetter from cache\n const resourceGetter = resourceCache.get(key)\n if (resourceGetter) {\n const resource = resourceGetter()\n i18nInstance.addResourceBundle(i18nInstance.language, ns, resource, true, false) //Last argument is set to false to prevent override of keys provided by partners on GustoProvider level through dictionary prop\n }\n }\n}\n\n/**\n * Used by individual components to override their dictionaries with partner provided resources\n *\n * @internal\n */\nexport const useComponentDictionary = <K extends keyof Resources>(\n ns: K,\n resource?: ResourceDictionary<K> | null,\n) => {\n const { i18n: i18nInstance } = useTranslation()\n if (resource) {\n for (const lang in resource) {\n i18nInstance.addResourceBundle(lang, ns, resource[lang], true, true)\n }\n }\n}\n"],"names":["defaultNS","translationLoaders","m","resolveTranslationLoader","lng","ns","primaryPath","resourceCache","LRUCache","loadResource","isLoading","isError","resource","promise","load","useI18n","namespaces","i18nInstance","useTranslation","nsMap","key","resourceGetter","useComponentDictionary","lang"],"mappings":";;AAQO,MAAMA,IAAY,UAEnBC,IAAqB,uBAAA,OAAA;AAAA,EAAA,+BAAA,MAAA,OAAA,gCAAA,EAAA,KAAA,CAAAC,MAAAA,EAAA,OAAA;AAAA,EAAA,qCAAA,MAAA,OAAA,sCAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,iCAAA,MAAA,OAAA,kCAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,kCAAA,MAAA,OAAA,mCAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,kCAAA,MAAA,OAAA,mCAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,8BAAA,MAAA,OAAA,+BAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,+BAAA,MAAA,OAAA,gCAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,4CAAA,MAAA,OAAA,6CAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,sDAAA,MAAA,OAAA,uDAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,wCAAA,MAAA,OAAA,yCAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,iCAAA,MAAA,OAAA,kCAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,mCAAA,MAAA,OAAA,oCAAA,EAAA,KAAA,CAAAA,MAAAA,EAAA,OAAA;AAAA,EAAA,gC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;AAAA,IACd;AAAA,EACF,GACgB;AAChB,SAAO,MAAM;AACX,QAAIA;AAEF,YAAMG;QACGF;AACT,YAAM,IAAI,MAAM,4CAA4CN,CAAE,EAAE;AAEhE,WAAOO;AAAA,EAEX;AACF,GAQaG,IAAU,CACrBC,MAEG;AAEH,QAAM,EAAE,MAAMC,EAAA,IAAiBC,EAAA;AAE/B,MAAI,CAACF,EAAY;AACjB,QAAMG,IAAQ,MAAM,QAAQH,CAAU,IAAIA,IAAa,CAACA,CAAU;AAClE,aAAWX,KAAMc,GAAO;AAKtB,UAAMC,IAAM,GAAGH,EAAa,QAAQ,IAAIZ,CAAE;AAE1C,IAAIE,EAAc,IAAIa,CAAG,MAAM,QAE7Bb,EAAc,IAAIa,GAAKX,EAAa,EAAE,KAAKQ,EAAa,UAAU,IAAAZ,EAAA,CAAQ,CAAC;AAG7E,UAAMgB,IAAiBd,EAAc,IAAIa,CAAG;AAC5C,QAAIC,GAAgB;AAClB,YAAMT,IAAWS,EAAA;AACjB,MAAAJ,EAAa,kBAAkBA,EAAa,UAAUZ,GAAIO,GAAU,IAAM,EAAK;AAAA,IACjF;AAAA,EACF;AACF,GAOaU,IAAyB,CACpCjB,GACAO,MACG;AACH,QAAM,EAAE,MAAMK,EAAA,IAAiBC,EAAA;AAC/B,MAAIN;AACF,eAAWW,KAAQX;AACjB,MAAAK,EAAa,kBAAkBM,GAAMlB,GAAIO,EAASW,CAAI,GAAG,IAAM,EAAI;AAGzE;"}
@@ -0,0 +1,24 @@
1
+ const e = "Pay schedule", t = "You have assigned everyone to be on one pay schedule.", a = "Manage", n = "Edit", o = "Edit pay schedule", s = "Edit AutoPilot", d = { name: "Name", frequency: "Frequency" }, l = { label: "AutoPilot", enabled: "Enabled", disabled: "Disabled" }, i = { assignmentUpdated: "Pay schedule assignment updated." }, c = {
2
+ title: e,
3
+ description: t,
4
+ manageCta: a,
5
+ editCta: n,
6
+ editScheduleAriaLabel: o,
7
+ editAutoPilotAriaLabel: s,
8
+ labels: d,
9
+ autoPilot: l,
10
+ alerts: i
11
+ };
12
+ export {
13
+ i as alerts,
14
+ l as autoPilot,
15
+ c as default,
16
+ t as description,
17
+ s as editAutoPilotAriaLabel,
18
+ n as editCta,
19
+ o as editScheduleAriaLabel,
20
+ d as labels,
21
+ a as manageCta,
22
+ e as title
23
+ };
24
+ //# sourceMappingURL=Company.Management.PaySchedule.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Company.Management.PaySchedule.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,18 @@
1
+ const e = { heading: "Choose schedule type", description: "After you choose, you can create a pay schedule for each group.", options: { single: { label: "Everyone on one schedule", description: "Choose one pay schedule for all your employees" } } }, a = { heading: "Assign employees", payScheduleLabel: "Pay schedule", payScheduleDescription: "The pay schedule to use for all employees.", addPayScheduleCta: "Add pay schedule" }, n = { heading: "Review changes", noChangesHeading: "There are no changes to review.", noChangesDescription: "If you intended to make changes, please go back and make them.", employeeChangesHeading: "Employees affected", nameLabel: "Name", transitionPayPeriodLabel: "Transition pay period", payFrequencyLabel: "New pay frequency", firstPayPeriodLabel: "First pay period", noTransitionNeeded: "No transition needed" }, o = "Back", s = "Continue", t = "Submit", i = {
2
+ typeStep: e,
3
+ scheduleStep: a,
4
+ reviewStep: n,
5
+ backCta: o,
6
+ continueCta: s,
7
+ submitCta: t
8
+ };
9
+ export {
10
+ o as backCta,
11
+ s as continueCta,
12
+ i as default,
13
+ n as reviewStep,
14
+ a as scheduleStep,
15
+ t as submitCta,
16
+ e as typeStep
17
+ };
18
+ //# sourceMappingURL=Company.Management.PayScheduleAssignment.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Company.Management.PayScheduleAssignment.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,4 +1,4 @@
1
- const e = { selfOnboardingWarningLabel: "Self-onboarding employees can change your company tax requirements", selfOnboardingWarningDescription: "If your employees are self-onboarding and enter details that change your company's state tax requirements (such as a home address in a new state), you may need to complete state tax setup again.", continueCta: "Continue", editStateTaxCta: "Edit tax settings", continueStateTaxSetupCta: "Continue setup", manageRatesCta: "Manage tax rates", hamburgerTitle: "Actions for {{state}}", requirementsListCol1: "State", requirementsListCol2: "Status", completeBadge: "Complete", incompleteBadge: "Missing information", notStartedBadge: "Not started", inProgressBadge: "In progress", startStateTaxSetupCta: "Start setup", defaultRatesAppliedText: "Default tax rates applied", readyToRunPayrollBadge: "Ready to run payroll", requirementsListLabel: "State tax requirements", emptyTableTitle: "No state tax requirements", emptyTableDescription: "Add company location or an employee to get started." }, t = { saveCta: "Save", cancelCta: "Cancel", title: "{{state}} tax requirements", effectiveFromLabel: "Effective: {{date}}", noEditableRequirementsTitle: "No editable requirements", noEditableRequirementsDescription: "This state does not have any editable tax requirements.", validations: { minValue: "Minimum value is {{min}}%", maxValue: "Maximum value is {{max}}%", oneOf: "Value must be one of: {{values}}", required: "This field is required" } }, a = { title: "Tax rates for {{state}}", subtitle: "Effective-dated tax rate history and scheduled future rates.", backCta: "Back to states", addRateCta: "Add tax rate", effectiveDateLabel: "Effective date", effectiveDatePlaceholder: "Select an effective date", effectiveDateColumnLabel: "Effective date", statusColumnLabel: "Status", currentBadge: "Current", scheduledBadge: "Scheduled", historicalBadge: "Historical", emptyHistoryTitle: "No effective-dated rates yet", emptyHistoryDescription: "Add a tax rate to schedule a future-dated configuration.", addRateDialogTitle: "Add tax rate for {{state}}", addRateDialogDescription: "Schedule a new tax configuration to take effect on a future date.", saveRateCta: "Save tax rate", cancelCta: "Cancel", noEditableFieldsTitle: "No editable fields", noEditableFieldsDescription: "This state does not expose editable effective-dated tax requirements.", rateScheduledSuccess: "Tax rate scheduled to take effect on {{date}}." }, i = {
1
+ const e = { selfOnboardingWarningLabel: "Self-onboarding employees can change your company tax requirements", selfOnboardingWarningDescription: "If your employees are self-onboarding and enter details that change your company's state tax requirements (such as a home address in a new state), you may need to complete state tax setup again.", continueCta: "Continue", editStateTaxCta: "Edit tax settings", continueStateTaxSetupCta: "Continue setup", manageRatesCta: "Manage tax rates", hamburgerTitle: "Actions for {{state}}", requirementsListCol1: "State", requirementsListCol2: "Status", completeBadge: "Complete", incompleteBadge: "Missing information", notStartedBadge: "Not started", inProgressBadge: "In progress", startStateTaxSetupCta: "Start setup", defaultRatesAppliedText: "Default tax rates applied", readyToRunPayrollBadge: "Ready to run payroll", requirementsListLabel: "State tax requirements", emptyTableTitle: "No state tax requirements", emptyTableDescription: "Add company location or an employee to get started." }, t = { saveCta: "Save", cancelCta: "Cancel", title: "{{state}} tax requirements", effectiveFromLabel: "Effective: {{date}}", noEditableRequirementsTitle: "No editable requirements", noEditableRequirementsDescription: "This state does not have any editable tax requirements.", errors: { incompleteRequirementSet: "{{section}} for {{state}} is incomplete. Complete all required fields and try again." }, validations: { minValue: "Minimum value is {{min}}%", maxValue: "Maximum value is {{max}}%", oneOf: "Value must be one of: {{values}}", required: "This field is required" } }, a = { title: "Tax rates for {{state}}", subtitle: "Effective-dated tax rate history and scheduled future rates.", backCta: "Back to states", addRateCta: "Add tax rate", effectiveDateLabel: "Effective date", effectiveDatePlaceholder: "Select an effective date", effectiveDateColumnLabel: "Effective date", statusColumnLabel: "Status", currentBadge: "Current", scheduledBadge: "Scheduled", historicalBadge: "Historical", emptyHistoryTitle: "No effective-dated rates yet", emptyHistoryDescription: "Add a tax rate to schedule a future-dated configuration.", addRateDialogTitle: "Add tax rate for {{state}}", addRateDialogDescription: "Schedule a new tax configuration to take effect on a future date.", saveRateCta: "Save tax rate", cancelCta: "Cancel", noEditableFieldsTitle: "No editable fields", noEditableFieldsDescription: "This state does not expose editable effective-dated tax requirements.", rateScheduledSuccess: "Tax rate scheduled to take effect on {{date}}." }, i = {
2
2
  list: e,
3
3
  form: t,
4
4
  manageRates: a
@@ -1,30 +1,28 @@
1
- const t = "Enter a net amount", a = "Please enter the net amount you want this employee to receive. We'll then automatically calculate the gross amount you need to pay, including taxes and deductions.", e = "This will override any previously entered amounts.", n = "Net amount", o = "Calculate", l = "Calculating...", s = "Apply", c = "Calculate a gross amount first to apply it.", r = "Cancel", u = "Calculated gross pay", i = "Unable to calculate gross up. Please try again.", y = { netPay: "Net amount must be greater than zero cents" }, p = {
1
+ const t = "Enter a net amount", a = "Please enter the net amount you want this employee to receive. We'll then automatically calculate the gross amount you need to pay, including taxes and deductions.", e = "This will override any previously entered amounts.", n = "Net amount", o = "Calculate", s = "Apply", l = "Calculate a gross amount first to apply it.", c = "Cancel", r = "Calculated gross pay", u = "Unable to calculate gross up. Please try again.", i = { netPay: "Net amount must be greater than zero cents" }, y = {
2
2
  title: t,
3
3
  description: a,
4
4
  warning: e,
5
5
  netPayLabel: n,
6
6
  calculateCta: o,
7
- calculatingCta: l,
8
7
  applyCta: s,
9
- applyHint: c,
10
- cancelCta: r,
11
- grossPayResult: u,
12
- errorMessage: i,
13
- validations: y
8
+ applyHint: l,
9
+ cancelCta: c,
10
+ grossPayResult: r,
11
+ errorMessage: u,
12
+ validations: i
14
13
  };
15
14
  export {
16
15
  s as applyCta,
17
- c as applyHint,
16
+ l as applyHint,
18
17
  o as calculateCta,
19
- l as calculatingCta,
20
- r as cancelCta,
21
- p as default,
18
+ c as cancelCta,
19
+ y as default,
22
20
  a as description,
23
- i as errorMessage,
24
- u as grossPayResult,
21
+ u as errorMessage,
22
+ r as grossPayResult,
25
23
  n as netPayLabel,
26
24
  t as title,
27
- y as validations,
25
+ i as validations,
28
26
  e as warning
29
27
  };
30
28
  //# sourceMappingURL=Payroll.GrossUpModal.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Payroll.GrossUpModal.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Payroll.GrossUpModal.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- const e = "Submit", a = "Back", t = "Save and exit", o = "Review payroll", l = "Payroll summary", s = "{{payrollType}} payroll for <dateWrapper>{{startDate}} - {{endDate}}</dateWrapper>", i = "{{payrollType}} payroll", n = "Submit", r = "Edit", y = "Cancel payroll", p = "Cancel {{startDate}} - {{endDate}} payroll?", c = "Cancel payroll?", d = "You may cancel this payroll and run it again later. Your changes will be saved.", m = "Run this payroll by {{deadline}} to pay your employees on time.", u = "Yes, cancel payroll", b = "No, go back", T = "View payroll receipt", g = "Download paystub pdf", h = "Generating paystub…", D = "Submitting payroll...", f = "This may take a minute or two. You can navigate away while this happens.", w = "Loading payroll...", P = "Cancelling payroll...", x = "This payroll has been cancelled.", k = "Skipped", C = { payrollNotCalculated: "Payroll is not calculated", payrollLoadFailed: "There was an issue loading this payroll. Please try again.", directDepositDeadline: "To pay your employees with direct deposit by {{payDate}}, you'll need to run payroll by {{time}} on {{date}}.", directDepositDeadlineText: "Make sure to submit before the deadline to ensure timely payments.", paystubPdfError: "There was an issue generating the paystub PDF. Please try again later.", payrollProcessedTitle: "Payroll submitted", payrollProcessedMessage: "{{amount}} will be debited on {{date}}. Make sure you have these funds available.", payrollProcessingFailedTitle: "There was an error submitting payroll", payrollProcessingFailedCtaLabel: "Recalculate payroll", wireDetailsSubmittedTitle: "Wire details submitted", wireDetailsSubmittedMessage: "Once we receive the funds from your bank we'll pay your team on {{checkDate}}" }, L = "Payroll Summary", S = "Payroll summary (Wire funds)", v = "Payroll summary (4-day direct deposit)", E = "Payroll summary table", B = { label: "Payroll details", companyPaysTab: "Company pays", companyPaysTable: "Company pays by employee", hoursWorkedTab: "Hours worked", hoursWorkedTable: "Hours worked by employee", employeeTakeHomeTab: "Employee take home", employeeTakeHomeTable: "Employee take home by employee", taxesTab: "Taxed and debited", taxesTable: "Taxes breakdown", debitedTable: "Debited totals by company" }, W = { totalPayroll: "Total payroll", debitAmount: "Debit amount", wireAmount: "Wire amount", wireTransferDeadline: "Wire transfer deadline", employees: "Employees", grossPay: "Gross Pay", reimbursements: "Reimbursements", debitAccount: "Debit account", debitDate: "Debit date", employeePayDate: "Employee pay date", companyTaxes: "Company taxes", companyBenefits: "Company benefits", companyPays: "Company pays", compensationType: "Compensation type", regular: "Regular", overtime: "Overtime (1.5x)", doubleOT: "Overtime (2x)", timeOff: "Paid time off", totalHours: "Total hours", paymentType: "Payment type", employeeTaxes: "Employee taxes", employeeBenefits: "Employee benefits", payment: "Payment", deductions: "Deductions", taxDescription: "Tax description", byYourEmployees: "By your employees", byYourCompany: "By your company", debitedByGusto: "Debited by Gusto", taxesTotal: "Total", paystub: "Paystub", footerTotalsLabel: "Totals", footerTotalsDescription: "All employees in this payroll" }, F = "Totals", _ = "Direct deposits", O = "Reimbursements", Y = "Garnishments", H = "Taxes (Employees and Employers)", R = { exempt: "Salaried / Exempt", nonexempt: "Hourly / Nonexempt" }, M = { genericBlockerTitle: "Submission blocked", genericBlockerMessage: "This payroll cannot be submitted. Please contact support for assistance.", fastAchOptions: { description: "Payroll can still be funded by selecting one of the options below. The selected funding method will only be used for this cycle and will not apply to future payroll.", fundingOptionsLabel: "Funding options", wireLabel: "Wire funds", wireFastestBadge: "Fastest", wireDescription: "Pay your employees on time by sending a wire transfer. We'll provide instructions on the next step.", directDepositLabel: "Switch to 4-day direct deposit", directDepositDescription: "Delay your employees pay date by four days and process using regular debits.", employeePayDate: "Employee pay date: {{date}}" }, fast_ach_threshold_exceeded: { title: "You have exceeded the limit at which you can process {{days}} payroll." }, needs_earned_access_for_fast_ach: { title: "You have not yet earned access to faster payroll." } }, A = {
1
+ const e = "Submit", a = "Back", t = "Save and exit", o = "Review payroll", l = "Payroll summary", s = "{{payrollType}} payroll for <dateWrapper>{{payPeriod}}</dateWrapper>", i = "{{payrollType}} payroll", n = "Submit", r = "Edit", y = "Cancel payroll", p = "Cancel {{payPeriod}} payroll?", c = "Cancel payroll?", d = "You may cancel this payroll and run it again later. Your changes will be saved.", m = "Run this payroll by {{deadline}} to pay your employees on time.", u = "Yes, cancel payroll", b = "No, go back", T = "View payroll receipt", g = "Download paystub pdf", h = "Generating paystub…", D = "Submitting payroll...", f = "This may take a minute or two. You can navigate away while this happens.", w = "Loading payroll...", P = "Cancelling payroll...", x = "This payroll has been cancelled.", k = "Skipped", C = { payrollNotCalculated: "Payroll is not calculated", payrollLoadFailed: "There was an issue loading this payroll. Please try again.", directDepositDeadline: "To pay your employees with direct deposit by {{payDate}}, you'll need to run payroll by {{time}} on {{date}}.", directDepositDeadlineText: "Make sure to submit before the deadline to ensure timely payments.", paystubPdfError: "There was an issue generating the paystub PDF. Please try again later.", payrollProcessedTitle: "Payroll submitted", payrollProcessedMessage: "{{amount}} will be debited on {{date}}. Make sure you have these funds available.", payrollProcessingFailedTitle: "There was an error submitting payroll", payrollProcessingFailedCtaLabel: "Recalculate payroll", wireDetailsSubmittedTitle: "Wire details submitted", wireDetailsSubmittedMessage: "Once we receive the funds from your bank we'll pay your team on {{checkDate}}" }, L = "Payroll Summary", S = "Payroll summary (Wire funds)", v = "Payroll summary (4-day direct deposit)", E = "Payroll summary table", B = { label: "Payroll details", companyPaysTab: "Company pays", companyPaysTable: "Company pays by employee", hoursWorkedTab: "Hours worked", hoursWorkedTable: "Hours worked by employee", employeeTakeHomeTab: "Employee take home", employeeTakeHomeTable: "Employee take home by employee", taxesTab: "Taxed and debited", taxesTable: "Taxes breakdown", debitedTable: "Debited totals by company" }, W = { totalPayroll: "Total payroll", debitAmount: "Debit amount", wireAmount: "Wire amount", wireTransferDeadline: "Wire transfer deadline", employees: "Employees", grossPay: "Gross Pay", reimbursements: "Reimbursements", debitAccount: "Debit account", debitDate: "Debit date", employeePayDate: "Employee pay date", companyTaxes: "Company taxes", companyBenefits: "Company benefits", companyPays: "Company pays", compensationType: "Compensation type", regular: "Regular", overtime: "Overtime (1.5x)", doubleOT: "Overtime (2x)", timeOff: "Paid time off", totalHours: "Total hours", paymentType: "Payment type", employeeTaxes: "Employee taxes", employeeBenefits: "Employee benefits", payment: "Payment", deductions: "Deductions", taxDescription: "Tax description", byYourEmployees: "By your employees", byYourCompany: "By your company", debitedByGusto: "Debited by Gusto", taxesTotal: "Total", paystub: "Paystub", footerTotalsLabel: "Totals", footerTotalsDescription: "All employees in this payroll" }, F = "Totals", _ = "Direct deposits", O = "Reimbursements", Y = "Garnishments", H = "Taxes (Employees and Employers)", R = { exempt: "Salaried / Exempt", nonexempt: "Hourly / Nonexempt" }, M = { genericBlockerTitle: "Submission blocked", genericBlockerMessage: "This payroll cannot be submitted. Please contact support for assistance.", fastAchOptions: { description: "Payroll can still be funded by selecting one of the options below. The selected funding method will only be used for this cycle and will not apply to future payroll.", fundingOptionsLabel: "Funding options", wireLabel: "Wire funds", wireFastestBadge: "Fastest", wireDescription: "Pay your employees on time by sending a wire transfer. We'll provide instructions on the next step.", directDepositLabel: "Switch to 4-day direct deposit", directDepositDescription: "Delay your employees pay date by four days and process using regular debits.", employeePayDate: "Employee pay date: {{date}}" }, fast_ach_threshold_exceeded: { title: "You have exceeded the limit at which you can process {{days}} payroll." }, needs_earned_access_for_fast_ach: { title: "You have not yet earned access to faster payroll." } }, A = {
2
2
  breadcrumbLabel: e,
3
3
  backCta: a,
4
4
  exitFlowCta: t,
@@ -1,44 +1,42 @@
1
- const e = { loading: "Loading component...", loadingOptions: "Loading options...", requiredField: "is a required field", errorEncountered: "There was a problem with your submission", multipleErrorsEncountered: "There were multiple problems with your submission" }, o = "(optional)", n = "Select an option...", t = "You are on step {{currentStep}} of {{totalSteps}}", i = "Back", r = { errorHeading: "Error", globalReactError: "Error while rendering SDK component: {{error}}", resetGlobalError: "Try again", unknownError: "Unknown Error", missingParamsOrContext: "{{component}} is missing {{param}} parameter or is used outside {{provider}}", unhandledEvent: "Unhandled event type: {{event}}", unknownEventType: "Unprocessed event type", ensureRequired: "Required prop is missing" }, a = { completedStep: "Completed step", selectArrow: "Show options", calendarArrow: "Show calendar", nextMonth: "Show next month", previousMonth: "Show previous month", paginationFirst: "Navigate to first page", paginationPrev: "Navigate to previous page", paginationNext: "Navigate to next page", paginationLast: "Navigate to last page" }, s = { paginationControlCountLabel: "Items per page", paginationFetchingLabel: "Fetching data...", openMenu: "Open menu", menuLabel: "Menu", tabNavigation: "Tab navigation", selectedItems: "Selected {{label}}", removeItem: "Remove {{label}}" }, d = { contractor: { undefined: "N/A", admin_onboarding_incomplete: "Admin-onboarding Incomplete", admin_onboarding_review: "Admin-onboarding review", onboarding_completed: "Completed", self_onboarding_not_invited: "Self-onboarding: Not Invited", self_onboarding_invited: "Self-onboarding: Invited", self_onboarding_started: "Self-onboarding started", self_onboarding_review: "Self-onboarding: Review" }, employee: { undefined: "N/A", admin_onboarding_incomplete: "Admin-onboarding Incomplete", onboarding_completed: "Completed", self_onboarding_pending_invite: "Self-onboarding: Pending Invite", self_onboarding_invited: "Self-onboarding: Invited", self_onboarding_invited_started: "Self-onboarding started", self_onboarding_invited_overdue: "Self-onboarding: Overdue", self_onboarding_completed_by_employee: "Self-onboarding: Completed", self_onboarding_awaiting_admin_review: "Self-onboarding: Admin review" } }, l = { ssn: { placeholder: "***-**-****" }, ein: { placeholder: "**-*******" }, workersCompensationRatePerHourAdornment: "/hr" }, m = { hourly: "{{amount}}/hr", weekly: "{{amount}}/yr", monthly: "{{amount}}/yr", yearly: "{{amount}}/yr", paycheck: "{{amount}}/paycheck" }, c = { hourly: "{{amount}} per hour", weekly: "{{amount}} per week", monthly: "{{amount}} per month", yearly: "{{amount}} per year", paycheck: "{{amount}} per paycheck" }, p = { accountName: "Account name is required", routingNumber: "Routing number should be a number (9 digits)", accountNumber: "Account number is a required field", ssn: "The SSN must be exactly 9 digits long, cannot contain all zeros in any group, and the first three digits cannot be '666' or in the range 900–999.", ssnRequired: "Social Security Number is required", location: "Location is not valid", dob: "Date of birth is required", percentageMin: "Minimum value is {{min}}%", percentageMax: "Maximum value is {{max}}%" }, g = { AL: "Alabama", AK: "Alaska", AZ: "Arizona", AR: "Arkansas", CA: "California", CO: "Colorado", CT: "Connecticut", DE: "Delaware", DC: "District of Columbia", FL: "Florida", GA: "Georgia", HI: "Hawaii", ID: "Idaho", IL: "Illinois", IN: "Indiana", IA: "Iowa", KS: "Kansas", KY: "Kentucky", LA: "Louisiana", ME: "Maine", MD: "Maryland", MA: "Massachusetts", MI: "Michigan", MN: "Minnesota", MS: "Mississippi", MO: "Missouri", MT: "Montana", NE: "Nebraska", NV: "Nevada", NH: "New Hampshire", NJ: "New Jersey", NM: "New Mexico", NY: "New York", NC: "North Carolina", ND: "North Dakota", OH: "Ohio", OK: "Oklahoma", OR: "Oregon", PA: "Pennsylvania", RI: "Rhode Island", SC: "South Carolina", SD: "South Dakota", TN: "Tennessee", TX: "Texas", UT: "Utah", VT: "Vermont", VA: "Virginia", WA: "Washington", WV: "West Virginia", WI: "Wisconsin", WY: "Wyoming" }, u = { selectRowHeader: "Select row", selectRowLabel: "Select row", selectAllRowsLabel: "Select all rows", actionsColumnHeader: "Actions" }, b = { selectRowLabel: "Select row", selectAllRowsLabel: "Select all rows" }, h = { owner: "Owner", president: "President", vice_president: "Vice President", treasurer: "Treasurer", corporate_officer: "Corporate Officer", partner: "Partner", member: "Member" }, v = { uploadInstructions: "<clickToUpload>Click to upload</clickToUpload> or drag and drop", acceptedTypes: "Only {{types}} files are permitted", removeFile: "Remove file" }, w = { itemMovedDown: "Item {{item}} moved down to position {{position}} of {{total}}", itemMovedUp: "Item {{item}} moved up to position {{position}} of {{total}}", dragStarted: "Started dragging item {{item}}", dragEnded: "Finished dragging item {{item}}", movedUp: "Item {{item}} moved up to position {{position}} of {{total}}", movedDown: "Item {{item}} moved down to position {{position}} of {{total}}", reorderingCanceled: "Reordering mode canceled for item {{item}}", reorderingExited: "Exited reordering mode for item {{item}}", reorderingStarted: "Entered reordering mode for item {{item}}. Use arrow keys to move, Escape to cancel, or Space to finish.", reorderingComplete: "Reordering complete for item {{item}}", draggableLabel: "Press Space or Enter to start reordering item {{item}}", draggableLabelActive: "Press arrow keys to move item {{item}}, or press Space/Enter to finish reordering", draggablePosition: "Item {{item}} at position {{position}} of {{total}}", item: "Item {{position}}", dropItemHere: "Drop item here", draggableItem: "Draggable item" }, f = {
1
+ const e = { loading: "Loading component...", loadingOptions: "Loading options...", requiredField: "is a required field", errorEncountered: "There was a problem with your submission", multipleErrorsEncountered: "There were multiple problems with your submission" }, o = "Select an option...", n = "You are on step {{currentStep}} of {{totalSteps}}", t = "Back", i = { errorHeading: "Error", globalReactError: "Error while rendering SDK component: {{error}}", resetGlobalError: "Try again", unknownError: "Unknown Error", missingParamsOrContext: "{{component}} is missing {{param}} parameter or is used outside {{provider}}", unhandledEvent: "Unhandled event type: {{event}}", unknownEventType: "Unprocessed event type", ensureRequired: "Required prop is missing" }, r = { completedStep: "Completed step", selectArrow: "Show options", calendarArrow: "Show calendar", nextMonth: "Show next month", previousMonth: "Show previous month", paginationFirst: "Navigate to first page", paginationPrev: "Navigate to previous page", paginationNext: "Navigate to next page", paginationLast: "Navigate to last page" }, a = { paginationControlCountLabel: "Items per page", paginationFetchingLabel: "Fetching data...", openMenu: "Open menu", menuLabel: "Menu", tabNavigation: "Tab navigation", selectedItems: "Selected {{label}}", removeItem: "Remove {{label}}" }, s = { contractor: { undefined: "N/A", admin_onboarding_incomplete: "Admin-onboarding Incomplete", admin_onboarding_review: "Admin-onboarding review", onboarding_completed: "Completed", self_onboarding_not_invited: "Self-onboarding: Not Invited", self_onboarding_invited: "Self-onboarding: Invited", self_onboarding_started: "Self-onboarding started", self_onboarding_review: "Self-onboarding: Review" }, employee: { undefined: "N/A", admin_onboarding_incomplete: "Admin-onboarding Incomplete", onboarding_completed: "Completed", self_onboarding_pending_invite: "Self-onboarding: Pending Invite", self_onboarding_invited: "Self-onboarding: Invited", self_onboarding_invited_started: "Self-onboarding started", self_onboarding_invited_overdue: "Self-onboarding: Overdue", self_onboarding_completed_by_employee: "Self-onboarding: Completed", self_onboarding_awaiting_admin_review: "Self-onboarding: Admin review" } }, d = { ssn: { placeholder: "***-**-****" }, ein: { placeholder: "**-*******" }, workersCompensationRatePerHourAdornment: "/hr" }, l = { hourly: "{{amount}}/hr", weekly: "{{amount}}/yr", monthly: "{{amount}}/yr", yearly: "{{amount}}/yr", paycheck: "{{amount}}/paycheck" }, m = { hourly: "{{amount}} per hour", weekly: "{{amount}} per week", monthly: "{{amount}} per month", yearly: "{{amount}} per year", paycheck: "{{amount}} per paycheck" }, c = { accountName: "Account name is required", routingNumber: "Routing number should be a number (9 digits)", accountNumber: "Account number is a required field", ssn: "The SSN must be exactly 9 digits long, cannot contain all zeros in any group, and the first three digits cannot be '666' or in the range 900–999.", ssnRequired: "Social Security Number is required", location: "Location is not valid", dob: "Date of birth is required", percentageMin: "Minimum value is {{min}}%", percentageMax: "Maximum value is {{max}}%" }, p = { AL: "Alabama", AK: "Alaska", AZ: "Arizona", AR: "Arkansas", CA: "California", CO: "Colorado", CT: "Connecticut", DE: "Delaware", DC: "District of Columbia", FL: "Florida", GA: "Georgia", HI: "Hawaii", ID: "Idaho", IL: "Illinois", IN: "Indiana", IA: "Iowa", KS: "Kansas", KY: "Kentucky", LA: "Louisiana", ME: "Maine", MD: "Maryland", MA: "Massachusetts", MI: "Michigan", MN: "Minnesota", MS: "Mississippi", MO: "Missouri", MT: "Montana", NE: "Nebraska", NV: "Nevada", NH: "New Hampshire", NJ: "New Jersey", NM: "New Mexico", NY: "New York", NC: "North Carolina", ND: "North Dakota", OH: "Ohio", OK: "Oklahoma", OR: "Oregon", PA: "Pennsylvania", RI: "Rhode Island", SC: "South Carolina", SD: "South Dakota", TN: "Tennessee", TX: "Texas", UT: "Utah", VT: "Vermont", VA: "Virginia", WA: "Washington", WV: "West Virginia", WI: "Wisconsin", WY: "Wyoming" }, g = { selectRowHeader: "Select row", selectRowLabel: "Select row", selectAllRowsLabel: "Select all rows", actionsColumnHeader: "Actions" }, u = { selectRowLabel: "Select row", selectAllRowsLabel: "Select all rows" }, b = { owner: "Owner", president: "President", vice_president: "Vice President", treasurer: "Treasurer", corporate_officer: "Corporate Officer", partner: "Partner", member: "Member" }, h = { uploadInstructions: "<clickToUpload>Click to upload</clickToUpload> or drag and drop", acceptedTypes: "Only {{types}} files are permitted", removeFile: "Remove file" }, v = { itemMovedDown: "Item {{item}} moved down to position {{position}} of {{total}}", itemMovedUp: "Item {{item}} moved up to position {{position}} of {{total}}", dragStarted: "Started dragging item {{item}}", dragEnded: "Finished dragging item {{item}}", movedUp: "Item {{item}} moved up to position {{position}} of {{total}}", movedDown: "Item {{item}} moved down to position {{position}} of {{total}}", reorderingCanceled: "Reordering mode canceled for item {{item}}", reorderingExited: "Exited reordering mode for item {{item}}", reorderingStarted: "Entered reordering mode for item {{item}}. Use arrow keys to move, Escape to cancel, or Space to finish.", reorderingComplete: "Reordering complete for item {{item}}", draggableLabel: "Press Space or Enter to start reordering item {{item}}", draggableLabelActive: "Press arrow keys to move item {{item}}, or press Space/Enter to finish reordering", draggablePosition: "Item {{item}} at position {{position}} of {{total}}", item: "Item {{position}}", dropItemHere: "Drop item here", draggableItem: "Draggable item" }, w = {
2
2
  status: e,
3
- optionalLabel: o,
4
- selectPlaceholder: n,
5
- progressBarLabel: t,
6
- back: i,
7
- errors: r,
8
- icons: a,
9
- labels: s,
10
- onboardingStatus: d,
11
- inputs: l,
12
- payRateFormats: m,
13
- compensationRateFormats: c,
14
- validations: p,
15
- statesHash: g,
16
- table: u,
17
- card: b,
18
- signatoryTitles: h,
19
- fileInput: v,
20
- reorderableList: w
3
+ selectPlaceholder: o,
4
+ progressBarLabel: n,
5
+ back: t,
6
+ errors: i,
7
+ icons: r,
8
+ labels: a,
9
+ onboardingStatus: s,
10
+ inputs: d,
11
+ payRateFormats: l,
12
+ compensationRateFormats: m,
13
+ validations: c,
14
+ statesHash: p,
15
+ table: g,
16
+ card: u,
17
+ signatoryTitles: b,
18
+ fileInput: h,
19
+ reorderableList: v
21
20
  };
22
21
  export {
23
- i as back,
24
- b as card,
25
- c as compensationRateFormats,
26
- f as default,
27
- r as errors,
28
- v as fileInput,
29
- a as icons,
30
- l as inputs,
31
- s as labels,
32
- d as onboardingStatus,
33
- o as optionalLabel,
34
- m as payRateFormats,
35
- t as progressBarLabel,
36
- w as reorderableList,
37
- n as selectPlaceholder,
38
- h as signatoryTitles,
39
- g as statesHash,
22
+ t as back,
23
+ u as card,
24
+ m as compensationRateFormats,
25
+ w as default,
26
+ i as errors,
27
+ h as fileInput,
28
+ r as icons,
29
+ d as inputs,
30
+ a as labels,
31
+ s as onboardingStatus,
32
+ l as payRateFormats,
33
+ n as progressBarLabel,
34
+ v as reorderableList,
35
+ o as selectPlaceholder,
36
+ b as signatoryTitles,
37
+ p as statesHash,
40
38
  e as status,
41
- u as table,
42
- p as validations
39
+ g as table,
40
+ c as validations
43
41
  };
44
42
  //# sourceMappingURL=common.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"common.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}