@gusto/embedded-react-sdk 0.11.1 → 0.11.3-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/assets/icons/alert-circle.svg.js.map +1 -1
- package/dist/assets/icons/caret-down.svg.js +1 -1
- package/dist/assets/icons/caret-down.svg.js.map +1 -1
- package/dist/assets/icons/caret-left.svg.js.map +1 -1
- package/dist/assets/icons/caret-right.svg.js.map +1 -1
- package/dist/assets/icons/checkbox.svg.js.map +1 -1
- package/dist/assets/icons/error.svg.js.map +1 -1
- package/dist/assets/icons/hamburger.svg.js.map +1 -1
- package/dist/assets/icons/info.svg.js.map +1 -1
- package/dist/assets/icons/list.svg.js.map +1 -1
- package/dist/assets/icons/magnifyingGlass.png.js.map +1 -1
- package/dist/assets/icons/pagination_next.svg.js.map +1 -1
- package/dist/assets/icons/pagination_previous.svg.js.map +1 -1
- package/dist/assets/icons/pencil.svg.js.map +1 -1
- package/dist/assets/icons/success_check.svg.js.map +1 -1
- package/dist/assets/icons/trashcan.svg.js.map +1 -1
- package/dist/assets/icons/unchecked_circular.svg.js.map +1 -1
- package/dist/assets/icons/verification_pending.svg.js.map +1 -1
- package/dist/assets/icons/warning.svg.js.map +1 -1
- package/dist/components/Base/Base.js +19 -18
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/createCompoundContext.js.map +1 -1
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Common/ActionsLayout/ActionsLayout.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Common/DocumentList/DocumentList.module.scss.js +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +1 -1
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
- package/dist/components/Common/FadeIn/FadeIn.js.map +1 -1
- package/dist/components/Common/FieldCaption/FieldCaption.js +7 -4
- package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -1
- package/dist/components/Common/FieldCaption/FieldCaption.module.scss.js +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.module.scss.js +1 -1
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -1
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.module.scss.js +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.module.scss.js +10 -10
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +1 -0
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +35 -20
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js.map +1 -1
- package/dist/components/Common/Fieldset/Fieldset.js.map +1 -1
- package/dist/components/Common/Flex/Flex.d.ts +2 -2
- package/dist/components/Common/Flex/Flex.js +5 -5
- package/dist/components/Common/Flex/Flex.js.map +1 -1
- package/dist/components/Common/Form/Form.js.map +1 -1
- package/dist/components/Common/Form/Form.module.scss.js +2 -2
- package/dist/components/Common/Grid/Grid.d.ts +2 -2
- package/dist/components/Common/Grid/Grid.js +13 -13
- package/dist/components/Common/Grid/Grid.js.map +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -1
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.module.scss.js +12 -12
- package/dist/components/Common/InternalError/InternalError.js.map +1 -1
- package/dist/components/Common/InternalError/InternalError.module.scss.js +1 -1
- package/dist/components/Common/Loading/Loading.js.map +1 -1
- package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.module.scss.js +1 -1
- package/dist/components/Common/ReorderableList/DropZone.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +15 -15
- package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
- package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +6 -4
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +6 -6
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +12 -10
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +8 -6
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +1 -1
- package/dist/components/Common/UI/Badge/Badge.js +4 -4
- package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
- package/dist/components/Common/UI/Badge/Badge.module.scss.js +4 -4
- package/dist/components/Common/UI/Button/Button.d.ts +1 -1
- package/dist/components/Common/UI/Button/Button.js +22 -24
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.d.ts +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.js +7 -5
- package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js +8 -0
- package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js.map +1 -0
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +2 -6
- package/dist/components/Common/UI/CalendarPreview/CalendarLegend.js.map +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js.map +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +5 -5
- package/dist/components/Common/UI/Card/Card.js.map +1 -1
- package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +6 -6
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.module.scss.js +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js +36 -36
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +6 -6
- package/dist/components/Common/UI/Heading/Heading.js.map +1 -1
- package/dist/components/Common/UI/Heading/Heading.module.scss.js +11 -11
- package/dist/components/Common/UI/Input/Input.js.map +1 -1
- package/dist/components/Common/UI/Input/Input.module.scss.js +12 -12
- package/dist/components/Common/UI/Link/Link.js.map +1 -1
- package/dist/components/Common/UI/Link/Link.module.scss.js +1 -1
- package/dist/components/Common/UI/List/List.module.scss.js +1 -1
- package/dist/components/Common/UI/List/OrderedList.js.map +1 -1
- package/dist/components/Common/UI/List/UnorderedList.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/NumberInput/NumberInput.js +36 -38
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.module.scss.js +1 -1
- package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
- package/dist/components/Common/UI/Radio/Radio.module.scss.js +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroup.module.scss.js +1 -1
- package/dist/components/Common/UI/Select/Select.js +13 -13
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.module.scss.js +1 -1
- package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
- package/dist/components/Common/UI/Switch/Switch.module.scss.js +4 -4
- package/dist/components/Common/UI/Table/Table.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Text/Text.js.map +1 -1
- package/dist/components/Common/UI/Text/Text.module.scss.js +16 -20
- package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Text/TextTypes.d.ts +1 -1
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Common/UI/hooks/useFieldIds.js.map +1 -1
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/components/Common/hooks/useAsyncError.js.map +1 -1
- package/dist/components/Common/hooks/useMenu.js.map +1 -1
- package/dist/components/Common/hooks/useNumberFormatter.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/SignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +8 -7
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +7 -6
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -2
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +9 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +7 -6
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +5 -3
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -5
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +12 -10
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Industry/Head.js.map +1 -1
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +4 -2
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +9 -8
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/Locations/locationsStateMachine.js.map +1 -1
- package/dist/components/Company/Locations/stateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +14 -12
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +8 -6
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -2
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +33 -31
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +12 -10
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +51 -52
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +8 -6
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +15 -13
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +0 -3
- package/dist/components/Company/PaySchedule/usePaySchedule.js +8 -8
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +8 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Head.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Head.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Contractor/Address/Actions.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +5 -4
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +1 -1
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/Head.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/List/index.js.map +1 -1
- package/dist/components/Contractor/List/useContractorList.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +17 -16
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +7 -5
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +10 -10
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +1 -1
- package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
- package/dist/components/Contractor/Submit/index.js +11 -9
- package/dist/components/Contractor/Submit/index.js.map +1 -1
- package/dist/components/Contractor/Submit/index.module.scss.js +2 -2
- package/dist/components/Employee/Compensation/Actions.js +6 -5
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +15 -14
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/Head.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +25 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +8 -14
- package/dist/components/Employee/Deductions/Deductions.js +47 -140
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +23 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js +31 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +41 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +135 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +6 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +99 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +15 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +49 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.d.ts +7 -0
- package/dist/components/Employee/Deductions/stateMachine.js +107 -0
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -0
- package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Head.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +8 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -4
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +7 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +15 -14
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +13 -12
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +6 -6
- package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccount.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +6 -5
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +10 -8
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Head.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +11 -10
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +9 -7
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -9
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/Head.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/WorkAddress.js.map +1 -1
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -3
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +10 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +14 -12
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
- package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -2
- package/dist/contexts/ApiProvider/ApiProvider.js +34 -30
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ComponentAdapter/ComponentsProvider.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +6 -4
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +16 -14
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/GustoProvider/SDKI18next.js.map +1 -1
- package/dist/contexts/GustoProvider/index.d.ts +2 -0
- package/dist/contexts/LoadingIndicatorProvider/LoadingIndicatorProvider.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/contexts/LocaleProvider/LocaleProvider.js.map +1 -1
- package/dist/contexts/LocaleProvider/useLocale.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +2 -3
- package/dist/contexts/ThemeProvider/ThemeProvider.js +20 -24
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +90 -0
- package/dist/contexts/ThemeProvider/theme.js +117 -0
- package/dist/contexts/ThemeProvider/theme.js.map +1 -0
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/contexts/index.d.ts +4 -0
- package/dist/helpers/LRUCache.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +10 -2
- package/dist/helpers/dateFormatting.js +30 -7
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/dateFormatting.test.d.ts +1 -0
- package/dist/helpers/ensureRequired.js.map +1 -1
- package/dist/helpers/federalEin.js.map +1 -1
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/helpers/getDataProps.js.map +1 -1
- package/dist/helpers/mask.js.map +1 -1
- package/dist/helpers/payRateCalculator.js.map +1 -1
- package/dist/helpers/rem.js +2 -3
- package/dist/helpers/rem.js.map +1 -1
- package/dist/helpers/responsive.d.ts +0 -3
- package/dist/helpers/responsive.js +20 -34
- package/dist/helpers/responsive.js.map +1 -1
- package/dist/helpers/ssn.js.map +1 -1
- package/dist/helpers/validations.js.map +1 -1
- package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.js.map +1 -1
- package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.AddBank.json.js +12 -12
- package/dist/i18n/en/Company.Addresses.json.js +12 -12
- package/dist/i18n/en/Company.AssignSignatory.json.js +5 -54
- package/dist/i18n/en/Company.AssignSignatory.json.js.map +1 -1
- package/dist/i18n/en/Company.BankAccount.json.js +19 -40
- package/dist/i18n/en/Company.BankAccount.json.js.map +1 -1
- package/dist/i18n/en/Company.DocumentList.json.js +15 -15
- package/dist/i18n/en/Company.FederalTaxes.json.js +16 -32
- package/dist/i18n/en/Company.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Company.Locations.json.js +43 -49
- package/dist/i18n/en/Company.Locations.json.js.map +1 -1
- package/dist/i18n/en/Company.OnboardingOverview.json.js +14 -36
- package/dist/i18n/en/Company.OnboardingOverview.json.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +1 -44
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.SignatureForm.json.js +9 -9
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -25
- package/dist/i18n/en/Company.StateTaxes.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Address.json.js +19 -24
- package/dist/i18n/en/Contractor.Address.json.js.map +1 -1
- package/dist/i18n/en/Contractor.ContractorList.json.js +9 -12
- package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js +10 -14
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +1 -1
- package/dist/i18n/en/Contractor.NewHireReport.json.js +5 -7
- package/dist/i18n/en/Contractor.NewHireReport.json.js.map +1 -1
- package/dist/i18n/en/Contractor.PaymentMethod.json.js +4 -17
- package/dist/i18n/en/Contractor.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Profile.json.js +1 -58
- package/dist/i18n/en/Contractor.Profile.json.js.map +1 -1
- package/dist/i18n/en/Employee.BankAccount.json.js +17 -19
- package/dist/i18n/en/Employee.BankAccount.json.js.map +1 -1
- package/dist/i18n/en/Employee.Compensation.json.js +31 -65
- package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.Deductions.json.js +64 -69
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.DocumentSigner.json.js +23 -23
- package/dist/i18n/en/Employee.EmployeeList.json.js +29 -29
- package/dist/i18n/en/Employee.HomeAddress.json.js +23 -28
- package/dist/i18n/en/Employee.HomeAddress.json.js.map +1 -1
- package/dist/i18n/en/Employee.Landing.json.js +11 -15
- package/dist/i18n/en/Employee.Landing.json.js.map +1 -1
- package/dist/i18n/en/Employee.OnboardingSummary.json.js +6 -28
- package/dist/i18n/en/Employee.OnboardingSummary.json.js.map +1 -1
- package/dist/i18n/en/Employee.PaySchedules.json.js +1 -5
- package/dist/i18n/en/Employee.PaySchedules.json.js.map +1 -1
- package/dist/i18n/en/Employee.PaymentMethod.json.js +29 -36
- package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/Employee.Profile.json.js +16 -22
- package/dist/i18n/en/Employee.Profile.json.js.map +1 -1
- package/dist/i18n/en/Employee.SplitPaycheck.json.js +21 -25
- package/dist/i18n/en/Employee.SplitPaycheck.json.js.map +1 -1
- package/dist/i18n/en/Employee.StateTaxes.json.js +4 -4
- package/dist/i18n/en/Employee.Taxes.json.js +26 -29
- package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistoryList.json.js +9 -9
- package/dist/i18n/en/common.json.d.ts +1 -1
- package/dist/i18n/en/common.json.js +1 -147
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/models/NAICSValues.js.map +1 -1
- package/dist/models/WA_RISK_CODES.js.map +1 -1
- package/dist/shared/constants.d.ts +8 -0
- package/dist/shared/constants.js +9 -5
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/hooks.d.ts +36 -0
- package/dist/types/i18next.d.ts +0 -1
- package/package.json +5 -5
- package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js +0 -8
- package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js.map +0 -1
- package/dist/components/Employee/Deductions/Actions.js +0 -25
- package/dist/components/Employee/Deductions/Actions.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionForm.d.ts +0 -1
- package/dist/components/Employee/Deductions/DeductionForm.js +0 -76
- package/dist/components/Employee/Deductions/DeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsList.d.ts +0 -2
- package/dist/components/Employee/Deductions/DeductionsList.js +0 -58
- package/dist/components/Employee/Deductions/DeductionsList.js.map +0 -1
- package/dist/components/Employee/Deductions/Head.js +0 -13
- package/dist/components/Employee/Deductions/Head.js.map +0 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.d.ts +0 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +0 -25
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +0 -1
- package/dist/components/Employee/Deductions/useDeductions.js +0 -33
- package/dist/components/Employee/Deductions/useDeductions.js.map +0 -1
- package/dist/contexts/ThemeProvider/createTheme.d.ts +0 -22
- package/dist/contexts/ThemeProvider/createTheme.js +0 -271
- package/dist/contexts/ThemeProvider/createTheme.js.map +0 -1
- package/dist/types/GTheme.d.ts +0 -255
- /package/dist/contexts/ThemeProvider/{createTheme.test.d.ts → theme.test.d.ts} +0 -0
|
@@ -1,36 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { QueryClient as
|
|
3
|
-
import { GustoEmbeddedProvider as
|
|
4
|
-
import { GustoEmbeddedCore as
|
|
5
|
-
import {
|
|
6
|
-
import { useMemo as
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
() =>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { QueryClient as p, QueryClientProvider as E } from "@tanstack/react-query";
|
|
3
|
+
import { GustoEmbeddedProvider as H } from "@gusto/embedded-api/react-query/_context";
|
|
4
|
+
import { GustoEmbeddedCore as b } from "@gusto/embedded-api/core";
|
|
5
|
+
import { SDKHooks as R } from "@gusto/embedded-api/hooks/hooks";
|
|
6
|
+
import { useMemo as a } from "react";
|
|
7
|
+
function Q({ url: i, headers: s, hooks: e, children: u }) {
|
|
8
|
+
const d = a(() => {
|
|
9
|
+
const r = new b({
|
|
10
|
+
serverURL: i
|
|
11
|
+
}), o = r._options.hooks || new R();
|
|
12
|
+
if (s) {
|
|
13
|
+
const t = {
|
|
14
|
+
beforeRequest: (g, n) => (new Headers(s).forEach((f, l) => {
|
|
15
|
+
f && n.headers.set(l, f);
|
|
16
|
+
}), n)
|
|
17
|
+
};
|
|
18
|
+
o.registerBeforeRequestHook(t);
|
|
19
|
+
}
|
|
20
|
+
return e?.beforeCreateRequest && e.beforeCreateRequest.forEach((t) => {
|
|
21
|
+
o.registerBeforeCreateRequestHook(t);
|
|
22
|
+
}), e?.beforeRequest && e.beforeRequest.forEach((t) => {
|
|
23
|
+
o.registerBeforeRequestHook(t);
|
|
24
|
+
}), e?.afterSuccess && e.afterSuccess.forEach((t) => {
|
|
25
|
+
o.registerAfterSuccessHook(t);
|
|
26
|
+
}), e?.afterError && e.afterError.forEach((t) => {
|
|
27
|
+
o.registerAfterErrorHook(t);
|
|
28
|
+
}), r._options.hooks || (r._options.hooks = o), r;
|
|
29
|
+
}, [i, s, e]), m = a(() => {
|
|
30
|
+
const r = new p(), o = async () => {
|
|
31
|
+
await r.invalidateQueries();
|
|
28
32
|
};
|
|
29
|
-
return
|
|
33
|
+
return r.setQueryDefaults(["@gusto/embedded-api"], { retry: !1 }), r.setMutationDefaults(["@gusto/embedded-api"], { onSettled: o, retry: !1 }), r;
|
|
30
34
|
}, []);
|
|
31
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ c(E, { client: m, children: /* @__PURE__ */ c(H, { client: d, children: u }) });
|
|
32
36
|
}
|
|
33
37
|
export {
|
|
34
|
-
|
|
38
|
+
Q as ApiProvider
|
|
35
39
|
};
|
|
36
40
|
//# sourceMappingURL=ApiProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { GustoEmbeddedProvider } from '@gusto/embedded-api/react-query/_context'\nimport { GustoEmbeddedCore } from '@gusto/embedded-api/core'\nimport {
|
|
1
|
+
{"version":3,"file":"ApiProvider.js","sources":["../../../src/contexts/ApiProvider/ApiProvider.tsx"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { GustoEmbeddedProvider } from '@gusto/embedded-api/react-query/_context'\nimport { GustoEmbeddedCore } from '@gusto/embedded-api/core'\nimport { SDKHooks as NativeSDKHooks } from '@gusto/embedded-api/hooks/hooks'\nimport { useMemo } from 'react'\nimport type { SDKHooks, BeforeRequestHook } from '@/types/hooks'\n\nexport interface ApiProviderProps {\n url: string\n headers?: HeadersInit\n hooks?: SDKHooks\n children: React.ReactNode\n}\n\nexport function ApiProvider({ url, headers, hooks, children }: ApiProviderProps) {\n const gustoClient = useMemo(() => {\n const client = new GustoEmbeddedCore({\n serverURL: url,\n })\n\n const sdkHooks = client._options.hooks || new NativeSDKHooks()\n\n if (headers) {\n const defaultHeaderHook: BeforeRequestHook = {\n beforeRequest: (context, request) => {\n const headersInstance = new Headers(headers)\n headersInstance.forEach((headerValue, headerName) => {\n if (headerValue) {\n request.headers.set(headerName, headerValue)\n }\n })\n return request\n },\n }\n sdkHooks.registerBeforeRequestHook(defaultHeaderHook)\n }\n\n if (hooks?.beforeCreateRequest) {\n hooks.beforeCreateRequest.forEach(hook => {\n sdkHooks.registerBeforeCreateRequestHook(hook)\n })\n }\n\n if (hooks?.beforeRequest) {\n hooks.beforeRequest.forEach(hook => {\n sdkHooks.registerBeforeRequestHook(hook)\n })\n }\n\n if (hooks?.afterSuccess) {\n hooks.afterSuccess.forEach(hook => {\n sdkHooks.registerAfterSuccessHook(hook)\n })\n }\n\n if (hooks?.afterError) {\n hooks.afterError.forEach(hook => {\n sdkHooks.registerAfterErrorHook(hook)\n })\n }\n\n if (!client._options.hooks) {\n client._options.hooks = sdkHooks\n }\n\n return client\n }, [url, headers, hooks])\n\n const queryClient = useMemo(() => {\n const client = new QueryClient()\n\n const onSettled = async () => {\n await client.invalidateQueries()\n }\n client.setQueryDefaults(['@gusto/embedded-api'], { retry: false })\n client.setMutationDefaults(['@gusto/embedded-api'], { onSettled, retry: false })\n\n return client\n }, [])\n\n return (\n <QueryClientProvider client={queryClient}>\n <GustoEmbeddedProvider client={gustoClient}>{children}</GustoEmbeddedProvider>\n </QueryClientProvider>\n )\n}\n"],"names":["ApiProvider","url","headers","hooks","children","gustoClient","useMemo","client","GustoEmbeddedCore","sdkHooks","NativeSDKHooks","defaultHeaderHook","context","request","headerValue","headerName","hook","queryClient","QueryClient","onSettled","jsx","QueryClientProvider","GustoEmbeddedProvider"],"mappings":";;;;;;AAcO,SAASA,EAAY,EAAE,KAAAC,GAAK,SAAAC,GAAS,OAAAC,GAAO,UAAAC,KAA8B;AAC/E,QAAMC,IAAcC,EAAQ,MAAM;AAChC,UAAMC,IAAS,IAAIC,EAAkB;AAAA,MACnC,WAAWP;AAAA,IAAA,CACZ,GAEKQ,IAAWF,EAAO,SAAS,SAAS,IAAIG,EAAA;AAE9C,QAAIR,GAAS;AACX,YAAMS,IAAuC;AAAA,QAC3C,eAAe,CAACC,GAASC,OACC,IAAI,QAAQX,CAAO,EAC3B,QAAQ,CAACY,GAAaC,MAAe;AACnD,UAAID,KACFD,EAAQ,QAAQ,IAAIE,GAAYD,CAAW;AAAA,QAE/C,CAAC,GACMD;AAAA,MACT;AAEF,MAAAJ,EAAS,0BAA0BE,CAAiB;AAAA,IACtD;AAEA,WAAIR,GAAO,uBACTA,EAAM,oBAAoB,QAAQ,CAAAa,MAAQ;AACxC,MAAAP,EAAS,gCAAgCO,CAAI;AAAA,IAC/C,CAAC,GAGCb,GAAO,iBACTA,EAAM,cAAc,QAAQ,CAAAa,MAAQ;AAClC,MAAAP,EAAS,0BAA0BO,CAAI;AAAA,IACzC,CAAC,GAGCb,GAAO,gBACTA,EAAM,aAAa,QAAQ,CAAAa,MAAQ;AACjC,MAAAP,EAAS,yBAAyBO,CAAI;AAAA,IACxC,CAAC,GAGCb,GAAO,cACTA,EAAM,WAAW,QAAQ,CAAAa,MAAQ;AAC/B,MAAAP,EAAS,uBAAuBO,CAAI;AAAA,IACtC,CAAC,GAGET,EAAO,SAAS,UACnBA,EAAO,SAAS,QAAQE,IAGnBF;AAAA,EACT,GAAG,CAACN,GAAKC,GAASC,CAAK,CAAC,GAElBc,IAAcX,EAAQ,MAAM;AAChC,UAAMC,IAAS,IAAIW,EAAA,GAEbC,IAAY,YAAY;AAC5B,YAAMZ,EAAO,kBAAA;AAAA,IACf;AACA,WAAAA,EAAO,iBAAiB,CAAC,qBAAqB,GAAG,EAAE,OAAO,IAAO,GACjEA,EAAO,oBAAoB,CAAC,qBAAqB,GAAG,EAAE,WAAAY,GAAW,OAAO,IAAO,GAExEZ;AAAA,EACT,GAAG,CAAA,CAAE;AAEL,SACE,gBAAAa,EAACC,KAAoB,QAAQJ,GAC3B,4BAACK,GAAA,EAAsB,QAAQjB,GAAc,UAAAD,EAAA,CAAS,EAAA,CACxD;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentsProvider.js","sources":["../../../src/contexts/ComponentAdapter/ComponentsProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useMemo } from 'react'\nimport type { ComponentsContextType } from './useComponentContext'\nimport { ComponentsContext } from './useComponentContext'\n\ninterface ComponentsProviderProps {\n children: React.ReactNode\n value: ComponentsContextType | undefined\n}\n\nexport const ComponentsProvider = ({ children, value }: ComponentsProviderProps) => {\n const contextValue = useMemo(() => {\n return value\n }, [value]) // This is intentional to make the component context immutable\n\n return (\n <ComponentsContext.Provider value={contextValue ?? null}>{children}</ComponentsContext.Provider>\n )\n}\n"],"names":["ComponentsProvider","children","value","contextValue","useMemo","ComponentsContext"],"mappings":";;;AAUO,MAAMA,IAAqB,CAAC,EAAE,UAAAC,GAAU,OAAAC,QAAqC;
|
|
1
|
+
{"version":3,"file":"ComponentsProvider.js","sources":["../../../src/contexts/ComponentAdapter/ComponentsProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useMemo } from 'react'\nimport type { ComponentsContextType } from './useComponentContext'\nimport { ComponentsContext } from './useComponentContext'\n\ninterface ComponentsProviderProps {\n children: React.ReactNode\n value: ComponentsContextType | undefined\n}\n\nexport const ComponentsProvider = ({ children, value }: ComponentsProviderProps) => {\n const contextValue = useMemo(() => {\n return value\n }, [value]) // This is intentional to make the component context immutable\n\n return (\n <ComponentsContext.Provider value={contextValue ?? null}>{children}</ComponentsContext.Provider>\n )\n}\n"],"names":["ComponentsProvider","children","value","contextValue","useMemo","ComponentsContext"],"mappings":";;;AAUO,MAAMA,IAAqB,CAAC,EAAE,UAAAC,GAAU,OAAAC,QAAqC;AAClF,QAAMC,IAAeC,EAAQ,MACpBF,GACN,CAACA,CAAK,CAAC;AAEV,2BACGG,EAAkB,UAAlB,EAA2B,OAAOF,KAAgB,MAAO,UAAAF,GAAS;AAEvE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Button","ButtonIcon","Card","TextInput","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,MAAMA,IAA2C;AAAA,EACtD,OAAO,CAACC,
|
|
1
|
+
{"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Button","ButtonIcon","Card","TextInput","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,MAAMA,IAA2C;AAAA,EACtD,OAAO,CAACC,MAAsB,gBAAAC,EAACC,GAAA,EAAO,GAAGF,GAAO;AAAA,EAChD,OAAO,CAACA,MAAsB,gBAAAC,EAACE,GAAA,EAAO,GAAGH,GAAO;AAAA,EAChD,QAAQ,CAACA,MAAuB,gBAAAC,EAACG,GAAA,EAAQ,GAAGJ,GAAO;AAAA,EACnD,YAAY,CAACA,MAA2B,gBAAAC,EAACI,GAAA,EAAY,GAAGL,GAAO;AAAA,EAC/D,MAAM,CAACA,MAAqB,gBAAAC,EAACK,GAAA,EAAM,GAAGN,GAAO;AAAA,EAC7C,WAAW,CAACA,MAA0B,gBAAAC,EAACM,GAAA,EAAW,GAAGP,GAAO;AAAA,EAC5D,UAAU,CAACA,MAAyB,gBAAAC,EAACO,GAAA,EAAU,GAAGR,GAAO;AAAA,EACzD,eAAe,CAACA,MAA8B,gBAAAC,EAACQ,GAAA,EAAe,GAAGT,GAAO;AAAA,EACxE,UAAU,CAACA,MAAyB,gBAAAC,EAACS,GAAA,EAAU,GAAGV,GAAO;AAAA,EACzD,YAAY,CAACA,MAA2B,gBAAAC,EAACU,GAAA,EAAY,GAAGX,GAAO;AAAA,EAC/D,aAAa,CAACA,MAA4B,gBAAAC,EAACW,GAAA,EAAa,GAAGZ,GAAO;AAAA,EAClE,eAAe,CAACA,MAA8B,gBAAAC,EAACY,GAAA,EAAe,GAAGb,GAAO;AAAA,EACxE,aAAa,CAACA,MAA4B,gBAAAC,EAACa,GAAA,EAAa,GAAGd,GAAO;AAAA,EAClE,OAAO,CAACA,MAAsB,gBAAAC,EAACc,GAAA,EAAO,GAAGf,GAAO;AAAA,EAChD,YAAY,CAACA,MAA2B,gBAAAC,EAACe,GAAA,EAAY,GAAGhB,GAAO;AAAA,EAC/D,QAAQ,CAACA,MAAuB,gBAAAC,EAACgB,GAAA,EAAQ,GAAGjB,GAAO;AAAA,EACnD,QAAQ,CAACA,MAAuB,gBAAAC,EAACiB,GAAA,EAAQ,GAAGlB,GAAO;AAAA,EACnD,MAAM,CAACA,MAAqB,gBAAAC,EAACkB,GAAA,EAAM,GAAGnB,GAAO;AAAA,EAC7C,MAAM,CAACA,MAAqB,gBAAAC,EAACmB,GAAA,EAAM,GAAGpB,GAAO;AAAA,EAC7C,OAAO,CAACA,MAAsB,gBAAAC,EAACoB,GAAA,EAAO,GAAGrB,GAAO;AAAA,EAChD,SAAS,CAACA,MAAwB,gBAAAC,EAACqB,GAAA,EAAS,GAAGtB,GAAO;AAAA,EACtD,MAAM,CAACA,MAAqB,gBAAAC,EAACsB,GAAA,EAAM,GAAGvB,GAAO;AAAA,EAC7C,iBAAiB,CAACA,MAAgC,gBAAAC,EAACuB,GAAA,EAAiB,GAAGxB,GAAO;AAAA,EAC9E,aAAa,CAACA,MAA4B,gBAAAC,EAACwB,GAAA,EAAa,GAAGzB,EAAA,CAAO;AACpE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComponentContext.js","sources":["../../../src/contexts/ComponentAdapter/useComponentContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { JSX } from 'react'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { ButtonIconProps, ButtonProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List/ListTypes'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar/ProgressBarTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Button: (props: ButtonProps) => JSX.Element | null\n ButtonIcon: (props: ButtonIconProps) => JSX.Element | null\n Card: (props: CardProps) => JSX.Element | null\n Checkbox: (props: CheckboxProps) => JSX.Element | null\n CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element | null\n ComboBox: (props: ComboBoxProps) => JSX.Element | null\n DatePicker: (props: DatePickerProps) => JSX.Element | null\n OrderedList: (props: OrderedListProps) => JSX.Element | null\n UnorderedList: (props: UnorderedListProps) => JSX.Element | null\n NumberInput: (props: NumberInputProps) => JSX.Element | null\n Radio: (props: RadioProps) => JSX.Element | null\n RadioGroup: (props: RadioGroupProps) => JSX.Element | null\n Select: (props: SelectProps) => JSX.Element | null\n Switch: (props: SwitchProps) => JSX.Element | null\n TextInput: (props: TextInputProps) => JSX.Element | null\n Link: (props: LinkProps) => JSX.Element | null\n Menu: (props: MenuProps) => JSX.Element | null\n Table: (props: TableProps) => JSX.Element | null\n Heading: (props: HeadingProps) => JSX.Element | null\n PaginationControl?: (props: PaginationControlProps) => JSX.Element | null\n Text: (props: TextProps) => JSX.Element | null\n CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null\n ProgressBar: (props: ProgressBarProps) => JSX.Element | null\n}\n\nexport const ComponentsContext = createContext<ComponentsContextType | null>(null)\n\nexport const useComponentContext = () => {\n const context = useContext(ComponentsContext)\n if (!context) {\n throw new Error('useComponentContext must be used within a ComponentsProvider')\n }\n return context\n}\n"],"names":["ComponentsContext","createContext","useComponentContext","context","useContext"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useComponentContext.js","sources":["../../../src/contexts/ComponentAdapter/useComponentContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { JSX } from 'react'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { ButtonIconProps, ButtonProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List/ListTypes'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar/ProgressBarTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Button: (props: ButtonProps) => JSX.Element | null\n ButtonIcon: (props: ButtonIconProps) => JSX.Element | null\n Card: (props: CardProps) => JSX.Element | null\n Checkbox: (props: CheckboxProps) => JSX.Element | null\n CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element | null\n ComboBox: (props: ComboBoxProps) => JSX.Element | null\n DatePicker: (props: DatePickerProps) => JSX.Element | null\n OrderedList: (props: OrderedListProps) => JSX.Element | null\n UnorderedList: (props: UnorderedListProps) => JSX.Element | null\n NumberInput: (props: NumberInputProps) => JSX.Element | null\n Radio: (props: RadioProps) => JSX.Element | null\n RadioGroup: (props: RadioGroupProps) => JSX.Element | null\n Select: (props: SelectProps) => JSX.Element | null\n Switch: (props: SwitchProps) => JSX.Element | null\n TextInput: (props: TextInputProps) => JSX.Element | null\n Link: (props: LinkProps) => JSX.Element | null\n Menu: (props: MenuProps) => JSX.Element | null\n Table: (props: TableProps) => JSX.Element | null\n Heading: (props: HeadingProps) => JSX.Element | null\n PaginationControl?: (props: PaginationControlProps) => JSX.Element | null\n Text: (props: TextProps) => JSX.Element | null\n CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null\n ProgressBar: (props: ProgressBarProps) => JSX.Element | null\n}\n\nexport const ComponentsContext = createContext<ComponentsContextType | null>(null)\n\nexport const useComponentContext = () => {\n const context = useContext(ComponentsContext)\n if (!context) {\n throw new Error('useComponentContext must be used within a ComponentsProvider')\n }\n return context\n}\n"],"names":["ComponentsContext","createContext","useComponentContext","context","useContext"],"mappings":";AAsDO,MAAMA,IAAoBC,EAA4C,IAAI,GAEpEC,IAAsB,MAAM;AACvC,QAAMC,IAAUC,EAAWJ,CAAiB;AAC5C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,8DAA8D;AAEhF,SAAOA;AACT;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GustoProvider.js","sources":["../../../src/contexts/GustoProvider/GustoProvider.tsx"],"sourcesContent":["import type React from 'react'\n// GustoProvider uses react-aria as the default components so we need to include the react-aria I18nProvider here.\n// For use without react-aria, the GustoProviderCustomUIAdapter can be used which does not includes it.\n// eslint-disable-next-line no-restricted-imports\nimport { I18nProvider } from 'react-aria-components'\nimport { defaultComponents } from '../ComponentAdapter/adapters/defaultComponentAdapter'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport {\n GustoProviderCustomUIAdapter,\n type GustoProviderProps,\n} from './GustoProviderCustomUIAdapter'\n\nexport interface GustoApiProps extends Omit<GustoProviderProps, 'components'> {\n components?: Partial<ComponentsContextType>\n children?: React.ReactNode\n}\n\nconst GustoProvider: React.FC<GustoApiProps> = props => {\n const { children, components = {}, locale, ...remainingProps } = props\n\n const mergedComponents = {\n ...defaultComponents,\n ...components,\n }\n\n return (\n <GustoProviderCustomUIAdapter locale={locale} {...remainingProps} components={mergedComponents}>\n {/* react-aria locale provider that exposes correct locale to number formatters */}\n <I18nProvider locale={locale}>{children}</I18nProvider>\n </GustoProviderCustomUIAdapter>\n )\n}\n\nexport { GustoProvider }\n\n/** @deprecated Import from `GustoProvider` instead */\nexport const GustoApiProvider = GustoProvider\n"],"names":["GustoProvider","props","children","components","locale","remainingProps","mergedComponents","defaultComponents","jsx","GustoProviderCustomUIAdapter","I18nProvider","GustoApiProvider"],"mappings":";;;;AAiBA,MAAMA,IAAyC,
|
|
1
|
+
{"version":3,"file":"GustoProvider.js","sources":["../../../src/contexts/GustoProvider/GustoProvider.tsx"],"sourcesContent":["import type React from 'react'\n// GustoProvider uses react-aria as the default components so we need to include the react-aria I18nProvider here.\n// For use without react-aria, the GustoProviderCustomUIAdapter can be used which does not includes it.\n// eslint-disable-next-line no-restricted-imports\nimport { I18nProvider } from 'react-aria-components'\nimport { defaultComponents } from '../ComponentAdapter/adapters/defaultComponentAdapter'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport {\n GustoProviderCustomUIAdapter,\n type GustoProviderProps,\n} from './GustoProviderCustomUIAdapter'\n\nexport interface GustoApiProps extends Omit<GustoProviderProps, 'components'> {\n components?: Partial<ComponentsContextType>\n children?: React.ReactNode\n}\n\nconst GustoProvider: React.FC<GustoApiProps> = props => {\n const { children, components = {}, locale, ...remainingProps } = props\n\n const mergedComponents = {\n ...defaultComponents,\n ...components,\n }\n\n return (\n <GustoProviderCustomUIAdapter locale={locale} {...remainingProps} components={mergedComponents}>\n {/* react-aria locale provider that exposes correct locale to number formatters */}\n <I18nProvider locale={locale}>{children}</I18nProvider>\n </GustoProviderCustomUIAdapter>\n )\n}\n\nexport { GustoProvider }\n\n/** @deprecated Import from `GustoProvider` instead */\nexport const GustoApiProvider = GustoProvider\n"],"names":["GustoProvider","props","children","components","locale","remainingProps","mergedComponents","defaultComponents","jsx","GustoProviderCustomUIAdapter","I18nProvider","GustoApiProvider"],"mappings":";;;;AAiBA,MAAMA,IAAyC,CAAAC,MAAS;AACtD,QAAM,EAAE,UAAAC,GAAU,YAAAC,IAAa,CAAA,GAAI,QAAAC,GAAQ,GAAGC,MAAmBJ,GAE3DK,IAAmB;AAAA,IACvB,GAAGC;AAAA,IACH,GAAGJ;AAAA,EAAA;AAGL,SACE,gBAAAK,EAACC,GAAA,EAA6B,QAAAL,GAAiB,GAAGC,GAAgB,YAAYC,GAE5E,UAAA,gBAAAE,EAACE,GAAA,EAAa,QAAAN,GAAiB,UAAAF,EAAA,CAAS,EAAA,CAC1C;AAEJ,GAKaS,IAAmBX;"}
|
|
@@ -2,11 +2,13 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { QueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { ComponentsContextType } from '../ComponentAdapter/useComponentContext';
|
|
4
4
|
import { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { GustoSDKTheme } from '../ThemeProvider/theme';
|
|
6
|
+
import { ResourceDictionary } from '../../types/Helpers';
|
|
7
|
+
import { SDKHooks } from '../../types/hooks';
|
|
8
|
+
export interface APIConfig {
|
|
8
9
|
baseUrl: string;
|
|
9
10
|
headers?: HeadersInit;
|
|
11
|
+
hooks?: SDKHooks;
|
|
10
12
|
}
|
|
11
13
|
export interface GustoProviderProps {
|
|
12
14
|
config: APIConfig;
|
|
@@ -14,7 +16,7 @@ export interface GustoProviderProps {
|
|
|
14
16
|
lng?: string;
|
|
15
17
|
locale?: string;
|
|
16
18
|
currency?: string;
|
|
17
|
-
theme?:
|
|
19
|
+
theme?: GustoSDKTheme;
|
|
18
20
|
queryClient?: QueryClient;
|
|
19
21
|
components: ComponentsContextType;
|
|
20
22
|
LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator'];
|
|
@@ -5,39 +5,41 @@ import { useEffect as g } from "react";
|
|
|
5
5
|
import { ComponentsProvider as P } from "../ComponentAdapter/ComponentsProvider.js";
|
|
6
6
|
import { ApiProvider as I } from "../ApiProvider/ApiProvider.js";
|
|
7
7
|
import { LoadingIndicatorProvider as x } from "../LoadingIndicatorProvider/LoadingIndicatorProvider.js";
|
|
8
|
-
import { SDKI18next as
|
|
8
|
+
import { SDKI18next as t } from "./SDKI18next.js";
|
|
9
|
+
import "classnames";
|
|
10
|
+
import "../../shared/constants.js";
|
|
9
11
|
import { InternalError as y } from "../../components/Common/InternalError/InternalError.js";
|
|
10
12
|
import { LocaleProvider as C } from "../LocaleProvider/LocaleProvider.js";
|
|
11
13
|
import { ThemeProvider as L } from "../ThemeProvider/ThemeProvider.js";
|
|
12
|
-
const
|
|
14
|
+
const R = (a) => {
|
|
13
15
|
const {
|
|
14
16
|
children: d,
|
|
15
|
-
config:
|
|
17
|
+
config: e,
|
|
16
18
|
dictionary: o,
|
|
17
|
-
lng:
|
|
19
|
+
lng: n = "en",
|
|
18
20
|
locale: c = "en-US",
|
|
19
21
|
currency: l = "USD",
|
|
20
22
|
theme: p,
|
|
21
|
-
components:
|
|
22
|
-
LoaderComponent:
|
|
23
|
+
components: s,
|
|
24
|
+
LoaderComponent: f
|
|
23
25
|
} = a;
|
|
24
26
|
if (o)
|
|
25
27
|
for (const u in o) {
|
|
26
|
-
const
|
|
27
|
-
for (const m in o[
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const i = u;
|
|
29
|
+
for (const m in o[i])
|
|
30
|
+
t.addResourceBundle(
|
|
31
|
+
i,
|
|
30
32
|
m,
|
|
31
|
-
o[
|
|
33
|
+
o[i][m],
|
|
32
34
|
!0,
|
|
33
35
|
!0
|
|
34
36
|
);
|
|
35
37
|
}
|
|
36
38
|
return g(() => {
|
|
37
|
-
(async () => await
|
|
38
|
-
}, [
|
|
39
|
+
(async () => await t.changeLanguage(n))();
|
|
40
|
+
}, [n]), /* @__PURE__ */ r(P, { value: s, children: /* @__PURE__ */ r(x, { value: f, children: /* @__PURE__ */ r(h, { FallbackComponent: y, children: /* @__PURE__ */ r(L, { theme: p, children: /* @__PURE__ */ r(C, { locale: c, currency: l, children: /* @__PURE__ */ r(v, { i18n: t, children: /* @__PURE__ */ r(I, { url: e.baseUrl, headers: e.headers, hooks: e.hooks, children: d }) }, n) }) }) }) }) });
|
|
39
41
|
};
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
R as GustoProviderCustomUIAdapter
|
|
42
44
|
};
|
|
43
45
|
//# sourceMappingURL=GustoProviderCustomUIAdapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport type { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type {
|
|
1
|
+
{"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport type { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type { GustoSDKTheme } from '@/contexts/ThemeProvider/theme'\nimport type { ResourceDictionary, SupportedLanguages } from '@/types/Helpers'\nimport type { SDKHooks } from '@/types/hooks'\n\nexport interface APIConfig {\n baseUrl: string\n headers?: HeadersInit\n hooks?: SDKHooks\n}\n\nexport interface GustoProviderProps {\n config: APIConfig\n dictionary?: ResourceDictionary\n lng?: string\n locale?: string\n currency?: string\n theme?: GustoSDKTheme\n queryClient?: QueryClient\n components: ComponentsContextType\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n}\n\nexport interface GustoProviderCustomUIAdapterProps extends GustoProviderProps {\n children?: React.ReactNode\n}\n\n/**\n * A provider that accepts UI component adapters through the components prop\n */\nconst GustoProviderCustomUIAdapter: React.FC<GustoProviderCustomUIAdapterProps> = props => {\n const {\n children,\n config,\n dictionary,\n lng = 'en',\n locale = 'en-US',\n currency = 'USD',\n theme,\n components,\n LoaderComponent,\n } = props\n\n // Handle dictionary resources\n if (dictionary) {\n for (const language in dictionary) {\n const lang = language as SupportedLanguages\n for (const ns in dictionary[lang]) {\n // Adding resources overrides to i18next instance - initial load will override common namespace and add component specific dictionaries provided by partners\n SDKI18next.addResourceBundle(\n lang,\n ns,\n (dictionary[lang] as Record<string, unknown>)[ns],\n true,\n true,\n )\n }\n }\n }\n\n // Handle language change\n useEffect(() => {\n void (async () => {\n await SDKI18next.changeLanguage(lng)\n })()\n }, [lng])\n\n return (\n <ComponentsProvider value={components}>\n <LoadingIndicatorProvider value={LoaderComponent}>\n <ErrorBoundary FallbackComponent={InternalError}>\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={locale} currency={currency}>\n <I18nextProvider i18n={SDKI18next} key={lng}>\n <ApiProvider url={config.baseUrl} headers={config.headers} hooks={config.hooks}>\n {children}\n </ApiProvider>\n </I18nextProvider>\n </LocaleProvider>\n </ThemeProvider>\n </ErrorBoundary>\n </LoadingIndicatorProvider>\n </ComponentsProvider>\n )\n}\n\nexport { GustoProviderCustomUIAdapter }\n"],"names":["GustoProviderCustomUIAdapter","props","children","config","dictionary","lng","locale","currency","theme","components","LoaderComponent","language","lang","ns","SDKI18next","useEffect","ComponentsProvider","jsx","LoadingIndicatorProvider","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider"],"mappings":";;;;;;;;;;;;;AA2CA,MAAMA,IAA4E,CAAAC,MAAS;AACzF,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,IACET;AAGJ,MAAIG;AACF,eAAWO,KAAYP,GAAY;AACjC,YAAMQ,IAAOD;AACb,iBAAWE,KAAMT,EAAWQ,CAAI;AAE9B,QAAAE,EAAW;AAAA,UACTF;AAAA,UACAC;AAAA,UACCT,EAAWQ,CAAI,EAA8BC,CAAE;AAAA,UAChD;AAAA,UACA;AAAA,QAAA;AAAA,IAGN;AAIF,SAAAE,EAAU,MAAM;AACd,KAAM,YACJ,MAAMD,EAAW,eAAeT,CAAG;AAAA,EAEvC,GAAG,CAACA,CAAG,CAAC,qBAGLW,GAAA,EAAmB,OAAOP,GACzB,UAAA,gBAAAQ,EAACC,GAAA,EAAyB,OAAOR,GAC/B,UAAA,gBAAAO,EAACE,GAAA,EAAc,mBAAmBC,GAChC,UAAA,gBAAAH,EAACI,GAAA,EAAc,OAAAb,GACb,UAAA,gBAAAS,EAACK,GAAA,EAAe,QAAAhB,GAAgB,UAAAC,GAC9B,UAAA,gBAAAU,EAACM,GAAA,EAAgB,MAAMT,GACrB,UAAA,gBAAAG,EAACO,GAAA,EAAY,KAAKrB,EAAO,SAAS,SAASA,EAAO,SAAS,OAAOA,EAAO,OACtE,UAAAD,GACH,EAAA,GAHsCG,CAIxC,GACF,EAAA,CACF,GACF,GACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDKI18next.js","sources":["../../../src/contexts/GustoProvider/SDKI18next.ts"],"sourcesContent":["import type { i18n } from 'i18next'\nimport i18next from 'i18next'\nimport { initReactI18next } from 'react-i18next'\nimport { defaultNS } from '@/i18n'\nimport commonEn from '@/i18n/en/common.json'\n\n/**Creating new i18next instance to avoid global clashing */\nconst SDKI18next: i18n = i18next.createInstance({\n debug: false,\n fallbackLng: 'en',\n resources: {\n en: { common: commonEn },\n },\n defaultNS,\n})\n\n// eslint-disable-next-line\nSDKI18next.use(initReactI18next).init().catch(console.error)\n\nexport { SDKI18next }\n"],"names":["SDKI18next","i18next","commonEn","defaultNS","initReactI18next"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"SDKI18next.js","sources":["../../../src/contexts/GustoProvider/SDKI18next.ts"],"sourcesContent":["import type { i18n } from 'i18next'\nimport i18next from 'i18next'\nimport { initReactI18next } from 'react-i18next'\nimport { defaultNS } from '@/i18n'\nimport commonEn from '@/i18n/en/common.json'\n\n/**Creating new i18next instance to avoid global clashing */\nconst SDKI18next: i18n = i18next.createInstance({\n debug: false,\n fallbackLng: 'en',\n resources: {\n en: { common: commonEn },\n },\n defaultNS,\n})\n\n// eslint-disable-next-line\nSDKI18next.use(initReactI18next).init().catch(console.error)\n\nexport { SDKI18next }\n"],"names":["SDKI18next","i18next","commonEn","defaultNS","initReactI18next"],"mappings":";;;;AAOA,MAAMA,IAAmBC,EAAQ,eAAe;AAAA,EAC9C,OAAO;AAAA,EACP,aAAa;AAAA,EACb,WAAW;AAAA,IACT,IAAI,EAAE,QAAQC,EAAA;AAAA,EAAS;AAAA,EAEzB,WAAAC;AACF,CAAC;AAGDH,EAAW,IAAII,CAAgB,EAAE,OAAO,MAAM,QAAQ,KAAK;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import "./types/i18next.d.ts"
|
|
2
2
|
export { GustoProvider, GustoApiProvider } from './GustoProvider';
|
|
3
|
+
export type { GustoApiProps } from './GustoProvider';
|
|
3
4
|
export { SDKI18next } from './SDKI18next';
|
|
4
5
|
export { GustoProviderCustomUIAdapter } from './GustoProviderCustomUIAdapter';
|
|
6
|
+
export type { GustoProviderProps, GustoProviderCustomUIAdapterProps, APIConfig, } from './GustoProviderCustomUIAdapter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingIndicatorProvider.js","sources":["../../../src/contexts/LoadingIndicatorProvider/LoadingIndicatorProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { LoadingIndicatorContext, type LoadingIndicatorContextProps } from './useLoadingIndicator'\nimport { Loading } from '@/components/Common/Loading/Loading'\n\nexport interface LoadingIndicatorProviderProps {\n children: ReactNode\n value?: LoadingIndicatorContextProps['LoadingIndicator']\n}\n\nexport function LoadingIndicatorProvider({ children, value }: LoadingIndicatorProviderProps) {\n return (\n <LoadingIndicatorContext.Provider value={{ LoadingIndicator: value ?? Loading }}>\n {children}\n </LoadingIndicatorContext.Provider>\n )\n}\n"],"names":["LoadingIndicatorProvider","children","value","jsx","LoadingIndicatorContext","Loading"],"mappings":";;;AASO,SAASA,EAAyB,EAAE,UAAAC,GAAU,OAAAC,KAAwC;
|
|
1
|
+
{"version":3,"file":"LoadingIndicatorProvider.js","sources":["../../../src/contexts/LoadingIndicatorProvider/LoadingIndicatorProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { LoadingIndicatorContext, type LoadingIndicatorContextProps } from './useLoadingIndicator'\nimport { Loading } from '@/components/Common/Loading/Loading'\n\nexport interface LoadingIndicatorProviderProps {\n children: ReactNode\n value?: LoadingIndicatorContextProps['LoadingIndicator']\n}\n\nexport function LoadingIndicatorProvider({ children, value }: LoadingIndicatorProviderProps) {\n return (\n <LoadingIndicatorContext.Provider value={{ LoadingIndicator: value ?? Loading }}>\n {children}\n </LoadingIndicatorContext.Provider>\n )\n}\n"],"names":["LoadingIndicatorProvider","children","value","jsx","LoadingIndicatorContext","Loading"],"mappings":";;;AASO,SAASA,EAAyB,EAAE,UAAAC,GAAU,OAAAC,KAAwC;AAC3F,SACE,gBAAAC,EAACC,EAAwB,UAAxB,EAAiC,OAAO,EAAE,kBAAkBF,KAASG,KACnE,UAAAJ,GACH;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadingIndicator.js","sources":["../../../src/contexts/LoadingIndicatorProvider/useLoadingIndicator.tsx"],"sourcesContent":["import type { JSX } from 'react'\nimport { createContext, useContext } from 'react'\nimport { Loading } from '@/components/Common/Loading/Loading'\n\nexport interface LoadingIndicatorContextProps {\n LoadingIndicator: () => JSX.Element\n}\nexport const LoadingIndicatorContext = createContext<LoadingIndicatorContextProps>({\n LoadingIndicator: () => <Loading />,\n})\n\nexport const useLoadingIndicator = () => useContext(LoadingIndicatorContext)\n"],"names":["LoadingIndicatorContext","createContext","jsx","Loading","useLoadingIndicator","useContext"],"mappings":";;;AAOO,MAAMA,IAA0BC,EAA4C;AAAA,EACjF,kBAAkB,MAAM,gBAAAC,EAACC,
|
|
1
|
+
{"version":3,"file":"useLoadingIndicator.js","sources":["../../../src/contexts/LoadingIndicatorProvider/useLoadingIndicator.tsx"],"sourcesContent":["import type { JSX } from 'react'\nimport { createContext, useContext } from 'react'\nimport { Loading } from '@/components/Common/Loading/Loading'\n\nexport interface LoadingIndicatorContextProps {\n LoadingIndicator: () => JSX.Element\n}\nexport const LoadingIndicatorContext = createContext<LoadingIndicatorContextProps>({\n LoadingIndicator: () => <Loading />,\n})\n\nexport const useLoadingIndicator = () => useContext(LoadingIndicatorContext)\n"],"names":["LoadingIndicatorContext","createContext","jsx","Loading","useLoadingIndicator","useContext"],"mappings":";;;AAOO,MAAMA,IAA0BC,EAA4C;AAAA,EACjF,kBAAkB,MAAM,gBAAAC,EAACC,GAAA,CAAA,CAAQ;AACnC,CAAC,GAEYC,IAAsB,MAAMC,EAAWL,CAAuB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocaleProvider.js","sources":["../../../src/contexts/LocaleProvider/LocaleProvider.tsx"],"sourcesContent":["import type { LocaleProps } from './useLocale'\nimport { LocaleContext } from './useLocale'\n\nexport interface LocaleProviderProps extends LocaleProps {\n children?: React.ReactNode\n}\n\nexport function LocaleProvider({\n locale = 'en-US',\n currency = 'USD',\n children,\n}: LocaleProviderProps) {\n return (\n <LocaleContext.Provider value={{ locale: locale, currency: currency }}>\n <div lang={locale}>{children}</div>\n </LocaleContext.Provider>\n )\n}\n"],"names":["LocaleProvider","locale","currency","children","jsx","LocaleContext"],"mappings":";;AAOO,SAASA,EAAe;AAAA,EAC7B,QAAAC,IAAS;AAAA,EACT,UAAAC,IAAW;AAAA,EACX,UAAAC;AACF,GAAwB;AACtB,
|
|
1
|
+
{"version":3,"file":"LocaleProvider.js","sources":["../../../src/contexts/LocaleProvider/LocaleProvider.tsx"],"sourcesContent":["import type { LocaleProps } from './useLocale'\nimport { LocaleContext } from './useLocale'\n\nexport interface LocaleProviderProps extends LocaleProps {\n children?: React.ReactNode\n}\n\nexport function LocaleProvider({\n locale = 'en-US',\n currency = 'USD',\n children,\n}: LocaleProviderProps) {\n return (\n <LocaleContext.Provider value={{ locale: locale, currency: currency }}>\n <div lang={locale}>{children}</div>\n </LocaleContext.Provider>\n )\n}\n"],"names":["LocaleProvider","locale","currency","children","jsx","LocaleContext"],"mappings":";;AAOO,SAASA,EAAe;AAAA,EAC7B,QAAAC,IAAS;AAAA,EACT,UAAAC,IAAW;AAAA,EACX,UAAAC;AACF,GAAwB;AACtB,SACE,gBAAAC,EAACC,EAAc,UAAd,EAAuB,OAAO,EAAE,QAAAJ,GAAgB,UAAAC,EAAA,GAC/C,UAAA,gBAAAE,EAAC,OAAA,EAAI,MAAMH,GAAS,UAAAE,GAAS,GAC/B;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.js","sources":["../../../src/contexts/LocaleProvider/useLocale.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nexport interface LocaleProps {\n locale: string\n currency: string\n}\n\nexport const LocaleContext = createContext<LocaleProps | null>(null)\n\nexport const useLocale = () => {\n const values = useContext(LocaleContext)\n if (!values) {\n throw new Error('useLocal used outside provider')\n }\n return values\n}\nexport const useLocaleDateFormatter = () => {\n const values = useContext(LocaleContext)\n if (!values) {\n throw new Error('useLocaleDateFormatter used outside provider')\n }\n return new Intl.DateTimeFormat(values.locale, {\n year: 'numeric',\n month: 'long',\n day: '2-digit',\n })\n}\n"],"names":["LocaleContext","createContext","useLocale","values","useContext","useLocaleDateFormatter"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useLocale.js","sources":["../../../src/contexts/LocaleProvider/useLocale.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nexport interface LocaleProps {\n locale: string\n currency: string\n}\n\nexport const LocaleContext = createContext<LocaleProps | null>(null)\n\nexport const useLocale = () => {\n const values = useContext(LocaleContext)\n if (!values) {\n throw new Error('useLocal used outside provider')\n }\n return values\n}\nexport const useLocaleDateFormatter = () => {\n const values = useContext(LocaleContext)\n if (!values) {\n throw new Error('useLocaleDateFormatter used outside provider')\n }\n return new Intl.DateTimeFormat(values.locale, {\n year: 'numeric',\n month: 'long',\n day: '2-digit',\n })\n}\n"],"names":["LocaleContext","createContext","useLocale","values","useContext","useLocaleDateFormatter"],"mappings":";AAOO,MAAMA,IAAgBC,EAAkC,IAAI,GAEtDC,IAAY,MAAM;AAC7B,QAAMC,IAASC,EAAWJ,CAAa;AACvC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,gCAAgC;AAElD,SAAOA;AACT,GACaE,IAAyB,MAAM;AAC1C,QAAMF,IAASC,EAAWJ,CAAa;AACvC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,8CAA8C;AAEhE,SAAO,IAAI,KAAK,eAAeA,EAAO,QAAQ;AAAA,IAC5C,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,EAAA,CACN;AACH;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { DeepPartial } from '../../types/Helpers';
|
|
2
|
+
import { GustoSDKTheme } from './theme';
|
|
4
3
|
export interface ThemeProviderProps {
|
|
5
|
-
theme?:
|
|
4
|
+
theme?: GustoSDKTheme;
|
|
6
5
|
children?: React.ReactNode;
|
|
7
6
|
}
|
|
8
7
|
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { createTheme as u } from "./createTheme.js";
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as c, useEffect as u } from "react";
|
|
3
|
+
import { useTranslation as a } from "react-i18next";
|
|
5
4
|
import { ThemeContext as d } from "./useTheme.js";
|
|
5
|
+
import { mergePartnerTheme as l } from "./theme.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
const
|
|
7
|
+
const D = ({
|
|
8
8
|
theme: n = {},
|
|
9
|
-
children:
|
|
9
|
+
children: t
|
|
10
10
|
}) => {
|
|
11
|
-
const e =
|
|
12
|
-
return
|
|
13
|
-
const i =
|
|
14
|
-
...u(n),
|
|
15
|
-
/**
|
|
16
|
-
* Adding a string from translations for indicating optional form elements with CSS
|
|
17
|
-
*/
|
|
18
|
-
optionalLabel: n.optionalLabel ?? `'${t("optionalLabel")}'`
|
|
19
|
-
};
|
|
11
|
+
const e = c(null), { t: r } = a(), o = c(null);
|
|
12
|
+
return u(() => {
|
|
13
|
+
const i = l(n);
|
|
20
14
|
e.current && e.current.remove(), e.current = document.createElement("style"), e.current.setAttribute("data-testid", "GSDK"), e.current.appendChild(
|
|
21
|
-
document.createTextNode(
|
|
22
|
-
|
|
15
|
+
document.createTextNode(
|
|
16
|
+
`.GSDK{
|
|
17
|
+
${m(i).join(`
|
|
23
18
|
`)}
|
|
24
|
-
}`
|
|
19
|
+
}`
|
|
20
|
+
)
|
|
25
21
|
), document.head.appendChild(e.current);
|
|
26
|
-
}, [n,
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
},
|
|
22
|
+
}, [n, r]), // @ts-expect-error HACK fix mismatch where containerRef allows null
|
|
23
|
+
/* @__PURE__ */ s(d.Provider, { value: { container: o }, children: /* @__PURE__ */ s("article", { className: "GSDK", "data-testid": "GSDK", ref: o, children: t }) });
|
|
24
|
+
}, m = (n, t) => {
|
|
29
25
|
const e = [];
|
|
30
|
-
for (const [
|
|
31
|
-
typeof
|
|
26
|
+
for (const [r, o] of Object.entries(n))
|
|
27
|
+
typeof o == "object" ? e.push(...m(o, t ? t + "-" + r : r)) : e.push(`--g-${t ? t + "-" + r : r}: ${String(o)};`);
|
|
32
28
|
return e;
|
|
33
29
|
};
|
|
34
30
|
export {
|
|
35
|
-
|
|
31
|
+
D as ThemeProvider
|
|
36
32
|
};
|
|
37
33
|
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sources":["../../../src/contexts/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport {
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sources":["../../../src/contexts/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { ThemeContext } from './useTheme'\nimport { mergePartnerTheme, type GustoSDKTheme } from './theme'\nimport '@/styles/sdk.scss'\n\nexport interface ThemeProviderProps {\n theme?: GustoSDKTheme\n children?: React.ReactNode\n}\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n theme: partnerThemeOverrides = {},\n children,\n}) => {\n const GThemeVariables = useRef<HTMLStyleElement | null>(null)\n const { t } = useTranslation()\n const containerRef = useRef<HTMLElement>(null)\n\n useEffect(() => {\n const gustoSDKThemeWithOverrides = mergePartnerTheme(partnerThemeOverrides)\n\n if (GThemeVariables.current) {\n GThemeVariables.current.remove()\n }\n GThemeVariables.current = document.createElement('style')\n GThemeVariables.current.setAttribute('data-testid', 'GSDK')\n GThemeVariables.current.appendChild(\n document.createTextNode(\n `.GSDK{\\n${parseThemeToCSS(gustoSDKThemeWithOverrides).join('\\n')}\\n}`,\n ),\n )\n document.head.appendChild(GThemeVariables.current)\n }, [partnerThemeOverrides, t])\n\n return (\n // @ts-expect-error HACK fix mismatch where containerRef allows null\n <ThemeContext.Provider value={{ container: containerRef }}>\n <article className=\"GSDK\" data-testid=\"GSDK\" ref={containerRef}>\n {children}\n </article>\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Recursive flattening of the theme object into css variable format\n */\nconst parseThemeToCSS = (theme: GustoSDKTheme, prefix?: string): string[] => {\n const cssProps: string[] = []\n for (const [key, value] of Object.entries(theme)) {\n if (typeof value === 'object') {\n cssProps.push(...parseThemeToCSS(value, prefix ? prefix + '-' + key : key))\n } else {\n cssProps.push(`--g-${prefix ? prefix + '-' + key : key}: ${String(value)};`)\n }\n }\n return cssProps\n}\n"],"names":["ThemeProvider","partnerThemeOverrides","children","GThemeVariables","useRef","t","useTranslation","containerRef","useEffect","gustoSDKThemeWithOverrides","mergePartnerTheme","parseThemeToCSS","ThemeContext","jsx","theme","prefix","cssProps","key","value"],"mappings":";;;;;;AAYO,MAAMA,IAA8C,CAAC;AAAA,EAC1D,OAAOC,IAAwB,CAAA;AAAA,EAC/B,UAAAC;AACF,MAAM;AACJ,QAAMC,IAAkBC,EAAgC,IAAI,GACtD,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAeH,EAAoB,IAAI;AAE7C,SAAAI,EAAU,MAAM;AACd,UAAMC,IAA6BC,EAAkBT,CAAqB;AAE1E,IAAIE,EAAgB,WAClBA,EAAgB,QAAQ,OAAA,GAE1BA,EAAgB,UAAU,SAAS,cAAc,OAAO,GACxDA,EAAgB,QAAQ,aAAa,eAAe,MAAM,GAC1DA,EAAgB,QAAQ;AAAA,MACtB,SAAS;AAAA,QACP;AAAA,EAAWQ,EAAgBF,CAA0B,EAAE,KAAK;AAAA,CAAI,CAAC;AAAA;AAAA,MAAA;AAAA,IACnE,GAEF,SAAS,KAAK,YAAYN,EAAgB,OAAO;AAAA,EACnD,GAAG,CAACF,GAAuBI,CAAC,CAAC;AAAA,oBAI1BO,EAAa,UAAb,EAAsB,OAAO,EAAE,WAAWL,EAAA,GACzC,UAAA,gBAAAM,EAAC,WAAA,EAAQ,WAAU,QAAO,eAAY,QAAO,KAAKN,GAC/C,UAAAL,GACH,EAAA,CACF;AAEJ,GAKMS,IAAkB,CAACG,GAAsBC,MAA8B;AAC3E,QAAMC,IAAqB,CAAA;AAC3B,aAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQJ,CAAK;AAC7C,IAAI,OAAOI,KAAU,WACnBF,EAAS,KAAK,GAAGL,EAAgBO,GAAOH,IAASA,IAAS,MAAME,IAAMA,CAAG,CAAC,IAE1ED,EAAS,KAAK,OAAOD,IAASA,IAAS,MAAME,IAAMA,CAAG,KAAK,OAAOC,CAAK,CAAC,GAAG;AAG/E,SAAOF;AACT;"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
declare const defaultThemeColors: {
|
|
2
|
+
colorBody: string;
|
|
3
|
+
colorBodyAccent: string;
|
|
4
|
+
colorBodyContent: string;
|
|
5
|
+
colorBodySubContent: string;
|
|
6
|
+
colorPrimary: string;
|
|
7
|
+
colorPrimaryAccent: string;
|
|
8
|
+
colorPrimaryContent: string;
|
|
9
|
+
colorSecondary: string;
|
|
10
|
+
colorSecondaryAccent: string;
|
|
11
|
+
colorSecondaryContent: string;
|
|
12
|
+
colorInfo: string;
|
|
13
|
+
colorInfoAccent: string;
|
|
14
|
+
colorInfoContent: string;
|
|
15
|
+
colorWarning: string;
|
|
16
|
+
colorWarningAccent: string;
|
|
17
|
+
colorWarningContent: string;
|
|
18
|
+
colorError: string;
|
|
19
|
+
colorErrorAccent: string;
|
|
20
|
+
colorErrorContent: string;
|
|
21
|
+
colorSuccess: string;
|
|
22
|
+
colorSuccessAccent: string;
|
|
23
|
+
colorSuccessContent: string;
|
|
24
|
+
colorBorder: string;
|
|
25
|
+
};
|
|
26
|
+
export type GustoSDKThemeColors = Partial<typeof defaultThemeColors>;
|
|
27
|
+
export declare const createTheme: (colors?: GustoSDKThemeColors) => {
|
|
28
|
+
inputBackgroundColor: string | undefined;
|
|
29
|
+
inputBorderColor: string;
|
|
30
|
+
inputContentColor: string | undefined;
|
|
31
|
+
inputBorderWidth: string;
|
|
32
|
+
inputPlaceholderColor: string | undefined;
|
|
33
|
+
inputAdornmentColor: string | undefined;
|
|
34
|
+
inputDisabledBackgroundColor: string | undefined;
|
|
35
|
+
inputLabelColor: string | undefined;
|
|
36
|
+
inputLabelFontSize: string;
|
|
37
|
+
inputLabelFontWeight: string;
|
|
38
|
+
inputDescriptionColor: string | undefined;
|
|
39
|
+
inputErrorColor: string | undefined;
|
|
40
|
+
inputRadius: string;
|
|
41
|
+
buttonRadius: string;
|
|
42
|
+
badgeRadius: string;
|
|
43
|
+
fontSizeRoot: string;
|
|
44
|
+
fontFamily: string;
|
|
45
|
+
fontLineHeight: string;
|
|
46
|
+
fontSizeSmall: string;
|
|
47
|
+
fontSizeRegular: string;
|
|
48
|
+
fontSizeLarge: string;
|
|
49
|
+
fontSizeHeading1: string;
|
|
50
|
+
fontSizeHeading2: string;
|
|
51
|
+
fontSizeHeading3: string;
|
|
52
|
+
fontSizeHeading4: string;
|
|
53
|
+
fontSizeHeading5: string;
|
|
54
|
+
fontSizeHeading6: string;
|
|
55
|
+
fontWeightRegular: string;
|
|
56
|
+
fontWeightMedium: string;
|
|
57
|
+
fontWeightSemibold: string;
|
|
58
|
+
fontWeightBold: string;
|
|
59
|
+
transitionDuration: string;
|
|
60
|
+
shadowResting: string;
|
|
61
|
+
shadowTopmost: string;
|
|
62
|
+
focusRingColor: string | undefined;
|
|
63
|
+
focusRingWidth: string;
|
|
64
|
+
colorBody: string;
|
|
65
|
+
colorBodyAccent: string;
|
|
66
|
+
colorBodyContent: string;
|
|
67
|
+
colorBodySubContent: string;
|
|
68
|
+
colorPrimary: string;
|
|
69
|
+
colorPrimaryAccent: string;
|
|
70
|
+
colorPrimaryContent: string;
|
|
71
|
+
colorSecondary: string;
|
|
72
|
+
colorSecondaryAccent: string;
|
|
73
|
+
colorSecondaryContent: string;
|
|
74
|
+
colorInfo: string;
|
|
75
|
+
colorInfoAccent: string;
|
|
76
|
+
colorInfoContent: string;
|
|
77
|
+
colorWarning: string;
|
|
78
|
+
colorWarningAccent: string;
|
|
79
|
+
colorWarningContent: string;
|
|
80
|
+
colorError: string;
|
|
81
|
+
colorErrorAccent: string;
|
|
82
|
+
colorErrorContent: string;
|
|
83
|
+
colorSuccess: string;
|
|
84
|
+
colorSuccessAccent: string;
|
|
85
|
+
colorSuccessContent: string;
|
|
86
|
+
colorBorder: string;
|
|
87
|
+
};
|
|
88
|
+
export type GustoSDKTheme = Partial<ReturnType<typeof createTheme>>;
|
|
89
|
+
export declare const mergePartnerTheme: (partnerTheme: GustoSDKTheme) => GustoSDKTheme;
|
|
90
|
+
export {};
|