@greatapps/common 1.1.790 → 1.1.791
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/dist/components/account/AccountHubLinkHandler.mjs +36 -0
- package/dist/components/account/AccountHubLinkHandler.mjs.map +1 -0
- package/dist/components/account/AccountModalLayout.mjs +137 -0
- package/dist/components/account/AccountModalLayout.mjs.map +1 -0
- package/dist/components/account/AccountModals.mjs +10 -3
- package/dist/components/account/AccountModals.mjs.map +1 -1
- package/dist/components/account/DeleteAccountModal.mjs +1 -1
- package/dist/components/account/DeleteAccountModal.mjs.map +1 -1
- package/dist/components/account/IsntPossibleDeleteAccountModal.mjs +8 -1
- package/dist/components/account/IsntPossibleDeleteAccountModal.mjs.map +1 -1
- package/dist/components/account/MyAccountModal.mjs +167 -0
- package/dist/components/account/MyAccountModal.mjs.map +1 -0
- package/dist/components/account/TwoFactorAuthModal.mjs +1 -1
- package/dist/components/account/TwoFactorAuthModal.mjs.map +1 -1
- package/dist/components/account/hooks/useAccountHubActions.mjs +85 -0
- package/dist/components/account/hooks/useAccountHubActions.mjs.map +1 -0
- package/dist/components/account/hooks/useAddCardWithPaymentSwitch.mjs +44 -0
- package/dist/components/account/hooks/useAddCardWithPaymentSwitch.mjs.map +1 -0
- package/dist/components/account/hooks/useAffiliatesActions.mjs +69 -0
- package/dist/components/account/hooks/useAffiliatesActions.mjs.map +1 -0
- package/dist/components/account/hooks/useMyAccountModal.mjs +27 -0
- package/dist/components/account/hooks/useMyAccountModal.mjs.map +1 -0
- package/dist/components/account/hooks/useProjectsActions.mjs +40 -0
- package/dist/components/account/hooks/useProjectsActions.mjs.map +1 -0
- package/dist/components/account/hooks/useSubscriptionActions.mjs +87 -0
- package/dist/components/account/hooks/useSubscriptionActions.mjs.map +1 -0
- package/dist/components/account/hooks/useTeamActions.mjs +31 -0
- package/dist/components/account/hooks/useTeamActions.mjs.map +1 -0
- package/dist/components/account/sections/AffiliatesSection.mjs +313 -0
- package/dist/components/account/sections/AffiliatesSection.mjs.map +1 -0
- package/dist/components/account/sections/ChangePasswordSection.mjs +5 -5
- package/dist/components/account/sections/ChangePasswordSection.mjs.map +1 -1
- package/dist/components/account/sections/MyProfileSection.mjs +194 -144
- package/dist/components/account/sections/MyProfileSection.mjs.map +1 -1
- package/dist/components/account/sections/PreferencesSection.mjs +60 -49
- package/dist/components/account/sections/PreferencesSection.mjs.map +1 -1
- package/dist/components/account/sections/ProjectsSection.mjs +77 -0
- package/dist/components/account/sections/ProjectsSection.mjs.map +1 -0
- package/dist/components/account/sections/SecuritySection.mjs +55 -36
- package/dist/components/account/sections/SecuritySection.mjs.map +1 -1
- package/dist/components/account/sections/SubscriptionSection.mjs +29 -0
- package/dist/components/account/sections/SubscriptionSection.mjs.map +1 -0
- package/dist/components/account/sections/TeamSection.mjs +119 -0
- package/dist/components/account/sections/TeamSection.mjs.map +1 -0
- package/dist/components/account/sections/TokenSection.mjs +41 -43
- package/dist/components/account/sections/TokenSection.mjs.map +1 -1
- package/dist/components/account/sections/affiliates/AffiliateCommissionCard.mjs +73 -0
- package/dist/components/account/sections/affiliates/AffiliateCommissionCard.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateFlows.mjs +20 -0
- package/dist/components/account/sections/affiliates/AffiliateFlows.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateLeadsSheet.mjs +99 -0
- package/dist/components/account/sections/affiliates/AffiliateLeadsSheet.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateStatsCard.mjs +31 -0
- package/dist/components/account/sections/affiliates/AffiliateStatsCard.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateStepCard.mjs +15 -0
- package/dist/components/account/sections/affiliates/AffiliateStepCard.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/AffiliateTransactionsList.mjs +108 -0
- package/dist/components/account/sections/affiliates/AffiliateTransactionsList.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/NoReceivingAccountModal.mjs +49 -0
- package/dist/components/account/sections/affiliates/NoReceivingAccountModal.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/ReceivingAccountModal.mjs +182 -0
- package/dist/components/account/sections/affiliates/ReceivingAccountModal.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/RequestWithdrawalSheet.mjs +476 -0
- package/dist/components/account/sections/affiliates/RequestWithdrawalSheet.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/ViewAttachmentModal.mjs +34 -0
- package/dist/components/account/sections/affiliates/ViewAttachmentModal.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/reports/AffiliatesIndicatorsChart.mjs +27 -0
- package/dist/components/account/sections/affiliates/reports/AffiliatesIndicatorsChart.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/reports/AffiliatesReportsTab.mjs +30 -0
- package/dist/components/account/sections/affiliates/reports/AffiliatesReportsTab.mjs.map +1 -0
- package/dist/components/account/sections/affiliates/reports/useAffiliatesIndicatorsChart.mjs +120 -0
- package/dist/components/account/sections/affiliates/reports/useAffiliatesIndicatorsChart.mjs.map +1 -0
- package/dist/components/account/sections/projects/DeleteProjectModal.mjs +205 -0
- package/dist/components/account/sections/projects/DeleteProjectModal.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectFlows.mjs +16 -0
- package/dist/components/account/sections/projects/ProjectFlows.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectMembersStack.mjs +53 -0
- package/dist/components/account/sections/projects/ProjectMembersStack.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectRow.mjs +85 -0
- package/dist/components/account/sections/projects/ProjectRow.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectSheet.mjs +499 -0
- package/dist/components/account/sections/projects/ProjectSheet.mjs.map +1 -0
- package/dist/components/account/sections/projects/ProjectsDisabledModal.mjs +55 -0
- package/dist/components/account/sections/projects/ProjectsDisabledModal.mjs.map +1 -0
- package/dist/components/account/sections/projects/project-form.schema.mjs +28 -0
- package/dist/components/account/sections/projects/project-form.schema.mjs.map +1 -0
- package/dist/components/account/sections/shared/ConnectListRow.mjs +45 -0
- package/dist/components/account/sections/shared/ConnectListRow.mjs.map +1 -0
- package/dist/components/account/sections/shared/DateFilterPopover.mjs +51 -0
- package/dist/components/account/sections/shared/DateFilterPopover.mjs.map +1 -0
- package/dist/components/account/sections/shared/EntityAvatar.mjs +41 -0
- package/dist/components/account/sections/shared/EntityAvatar.mjs.map +1 -0
- package/dist/components/account/sections/shared/FilterPopover.mjs +62 -0
- package/dist/components/account/sections/shared/FilterPopover.mjs.map +1 -0
- package/dist/components/account/sections/shared/FormSection.mjs +14 -0
- package/dist/components/account/sections/shared/FormSection.mjs.map +1 -0
- package/dist/components/account/sections/shared/IconBox.mjs +18 -0
- package/dist/components/account/sections/shared/IconBox.mjs.map +1 -0
- package/dist/components/account/sections/shared/InfiniteScrollList.mjs +36 -0
- package/dist/components/account/sections/shared/InfiniteScrollList.mjs.map +1 -0
- package/dist/components/account/sections/shared/ListPagination.mjs +69 -0
- package/dist/components/account/sections/shared/ListPagination.mjs.map +1 -0
- package/dist/components/account/sections/shared/RowActionsMenu.mjs +52 -0
- package/dist/components/account/sections/shared/RowActionsMenu.mjs.map +1 -0
- package/dist/components/account/sections/shared/SectionLoadError.mjs +20 -0
- package/dist/components/account/sections/shared/SectionLoadError.mjs.map +1 -0
- package/dist/components/account/sections/shared/StatusBadge.mjs +26 -0
- package/dist/components/account/sections/shared/StatusBadge.mjs.map +1 -0
- package/dist/components/account/sections/shared/WorkspaceSection.mjs +10 -0
- package/dist/components/account/sections/shared/WorkspaceSection.mjs.map +1 -0
- package/dist/components/account/sections/subscription/AiCreditsUsage.mjs +106 -0
- package/dist/components/account/sections/subscription/AiCreditsUsage.mjs.map +1 -0
- package/dist/components/account/sections/subscription/BillingAddressSheet.mjs +407 -0
- package/dist/components/account/sections/subscription/BillingAddressSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/BoletoDetailsDialog.mjs +73 -0
- package/dist/components/account/sections/subscription/BoletoDetailsDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/BoletoGeneratedDialog.mjs +22 -0
- package/dist/components/account/sections/subscription/BoletoGeneratedDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/CancelPlanDialog.mjs +161 -0
- package/dist/components/account/sections/subscription/CancelPlanDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ChargeRow.mjs +127 -0
- package/dist/components/account/sections/subscription/ChargeRow.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ChargeStatusBadge.mjs +27 -0
- package/dist/components/account/sections/subscription/ChargeStatusBadge.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ChargesList.mjs +88 -0
- package/dist/components/account/sections/subscription/ChargesList.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ManageCardsSheet.mjs +49 -0
- package/dist/components/account/sections/subscription/ManageCardsSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/OverdueReceiptOpener.mjs +26 -0
- package/dist/components/account/sections/subscription/OverdueReceiptOpener.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PayChargeDialog.mjs +222 -0
- package/dist/components/account/sections/subscription/PayChargeDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PaymentConfirmationDialog.mjs +61 -0
- package/dist/components/account/sections/subscription/PaymentConfirmationDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PaymentMethodsCard.mjs +72 -0
- package/dist/components/account/sections/subscription/PaymentMethodsCard.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PendingChangeDialog.mjs +117 -0
- package/dist/components/account/sections/subscription/PendingChangeDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PixDetailsDialog.mjs +165 -0
- package/dist/components/account/sections/subscription/PixDetailsDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PixPaymentDialog.mjs +155 -0
- package/dist/components/account/sections/subscription/PixPaymentDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/PlanDetailsSheet.mjs +253 -0
- package/dist/components/account/sections/subscription/PlanDetailsSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/ReceiptDetailsSheet.mjs +237 -0
- package/dist/components/account/sections/subscription/ReceiptDetailsSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/SubscriptionFlows.mjs +40 -0
- package/dist/components/account/sections/subscription/SubscriptionFlows.mjs.map +1 -0
- package/dist/components/account/sections/subscription/SubscriptionPlanCard.mjs +303 -0
- package/dist/components/account/sections/subscription/SubscriptionPlanCard.mjs.map +1 -0
- package/dist/components/account/sections/subscription/UsageReportSheet.mjs +163 -0
- package/dist/components/account/sections/subscription/UsageReportSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/ChangePlanSheet.mjs +75 -0
- package/dist/components/account/sections/subscription/change-plan/ChangePlanSheet.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/AbTestDetailsDialog.mjs +55 -0
- package/dist/components/account/sections/subscription/change-plan/components/AbTestDetailsDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/AddonsBlock.mjs +188 -0
- package/dist/components/account/sections/subscription/change-plan/components/AddonsBlock.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/AlternativeBucketsSection.mjs +66 -0
- package/dist/components/account/sections/subscription/change-plan/components/AlternativeBucketsSection.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/CouponBlock.mjs +42 -0
- package/dist/components/account/sections/subscription/change-plan/components/CouponBlock.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/CouponDialog.mjs +119 -0
- package/dist/components/account/sections/subscription/change-plan/components/CouponDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/PricePreview.mjs +17 -0
- package/dist/components/account/sections/subscription/change-plan/components/PricePreview.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/components/SummaryBlock.mjs +130 -0
- package/dist/components/account/sections/subscription/change-plan/components/SummaryBlock.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/plan-comparison.mjs +38 -0
- package/dist/components/account/sections/subscription/change-plan/plan-comparison.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PaymentSummaryStep.mjs +127 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PaymentSummaryStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PlanComparisonStep.mjs +111 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PlanComparisonStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PlanViewStep.mjs +69 -0
- package/dist/components/account/sections/subscription/change-plan/steps/PlanViewStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/ReactivationConfigStep.mjs +88 -0
- package/dist/components/account/sections/subscription/change-plan/steps/ReactivationConfigStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/steps/ReactivationPaymentStep.mjs +115 -0
- package/dist/components/account/sections/subscription/change-plan/steps/ReactivationPaymentStep.mjs.map +1 -0
- package/dist/components/account/sections/subscription/change-plan/useChangePlanState.mjs +918 -0
- package/dist/components/account/sections/subscription/change-plan/useChangePlanState.mjs.map +1 -0
- package/dist/components/account/sections/subscription/downgrade/CannotDowngradeDialog.mjs +216 -0
- package/dist/components/account/sections/subscription/downgrade/CannotDowngradeDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/downgrade/DowngradeReasonDialog.mjs +128 -0
- package/dist/components/account/sections/subscription/downgrade/DowngradeReasonDialog.mjs.map +1 -0
- package/dist/components/account/sections/subscription/plans/PlanCard.mjs +281 -0
- package/dist/components/account/sections/subscription/plans/PlanCard.mjs.map +1 -0
- package/dist/components/account/sections/subscription/plans/PlanCardSkeleton.mjs +53 -0
- package/dist/components/account/sections/subscription/plans/PlanCardSkeleton.mjs.map +1 -0
- package/dist/components/account/sections/subscription/plans/PlansCatalogDialog.mjs +119 -0
- package/dist/components/account/sections/subscription/plans/PlansCatalogDialog.mjs.map +1 -0
- package/dist/components/account/sections/team/DeleteUserModal.mjs +116 -0
- package/dist/components/account/sections/team/DeleteUserModal.mjs.map +1 -0
- package/dist/components/account/sections/team/TeamFlows.mjs +14 -0
- package/dist/components/account/sections/team/TeamFlows.mjs.map +1 -0
- package/dist/components/account/sections/team/TeamMemberRow.mjs +99 -0
- package/dist/components/account/sections/team/TeamMemberRow.mjs.map +1 -0
- package/dist/components/account/sections/team/UserSheet.mjs +570 -0
- package/dist/components/account/sections/team/UserSheet.mjs.map +1 -0
- package/dist/components/account/sections/team/steps/NotificationsStep.mjs +80 -0
- package/dist/components/account/sections/team/steps/NotificationsStep.mjs.map +1 -0
- package/dist/components/account/sections/team/steps/ProjectSelectionStep.mjs +180 -0
- package/dist/components/account/sections/team/steps/ProjectSelectionStep.mjs.map +1 -0
- package/dist/components/account/sections/team/steps/UserInformationStep.mjs +371 -0
- package/dist/components/account/sections/team/steps/UserInformationStep.mjs.map +1 -0
- package/dist/components/account/sections/team/user-form.schema.mjs +37 -0
- package/dist/components/account/sections/team/user-form.schema.mjs.map +1 -0
- package/dist/components/account/types/workspace-actions.type.mjs +1 -0
- package/dist/components/account/types/workspace-actions.type.mjs.map +1 -0
- package/dist/components/layouts/ProfilePopover.mjs +10 -12
- package/dist/components/layouts/ProfilePopover.mjs.map +1 -1
- package/dist/components/layouts/UsersSelectorPopover.mjs +7 -4
- package/dist/components/layouts/UsersSelectorPopover.mjs.map +1 -1
- package/dist/components/modals/AccountDeletionWarningModal.mjs +4 -5
- package/dist/components/modals/AccountDeletionWarningModal.mjs.map +1 -1
- package/dist/components/modals/AccountFrozenModal.mjs +6 -3
- package/dist/components/modals/AccountFrozenModal.mjs.map +1 -1
- package/dist/components/modals/Modals.mjs +3 -3
- package/dist/components/modals/Modals.mjs.map +1 -1
- package/dist/components/modals/PaidPlanRequiredModal.mjs +4 -5
- package/dist/components/modals/PaidPlanRequiredModal.mjs.map +1 -1
- package/dist/components/modals/cards/AddFirstCardWarningModal.mjs +63 -0
- package/dist/components/modals/cards/AddFirstCardWarningModal.mjs.map +1 -0
- package/dist/components/modals/cards/SwitchPaymentToCardModal.mjs +187 -0
- package/dist/components/modals/cards/SwitchPaymentToCardModal.mjs.map +1 -0
- package/dist/components/modals/promo/AiCreditsOfferModal/AiCreditsOfferModal.mjs +5 -4
- package/dist/components/modals/promo/AiCreditsOfferModal/AiCreditsOfferModal.mjs.map +1 -1
- package/dist/components/ui/data-display/CardItem.mjs +9 -1
- package/dist/components/ui/data-display/CardItem.mjs.map +1 -1
- package/dist/components/ui/data-display/PaymentMethodIcons.mjs +50 -0
- package/dist/components/ui/data-display/PaymentMethodIcons.mjs.map +1 -0
- package/dist/components/ui/form/BillingPeriodSelector.mjs +108 -0
- package/dist/components/ui/form/BillingPeriodSelector.mjs.map +1 -0
- package/dist/components/ui/form/PaymentMethodToggle.mjs +82 -0
- package/dist/components/ui/form/PaymentMethodToggle.mjs.map +1 -0
- package/dist/components/ui/form/RadioOptionFieldIcon.mjs +57 -0
- package/dist/components/ui/form/RadioOptionFieldIcon.mjs.map +1 -0
- package/dist/components/ui/form/SegmentedControl.mjs +56 -0
- package/dist/components/ui/form/SegmentedControl.mjs.map +1 -0
- package/dist/components/ui/overlay/Dialog.mjs +21 -4
- package/dist/components/ui/overlay/Dialog.mjs.map +1 -1
- package/dist/components/ui/overlay/Sheet.mjs +26 -8
- package/dist/components/ui/overlay/Sheet.mjs.map +1 -1
- package/dist/components/ui/overlay/layers.mjs +52 -5
- package/dist/components/ui/overlay/layers.mjs.map +1 -1
- package/dist/enums/AccountHubFlow.mjs +13 -0
- package/dist/enums/AccountHubFlow.mjs.map +1 -0
- package/dist/enums/DateFilterPeriod.mjs +22 -0
- package/dist/enums/DateFilterPeriod.mjs.map +1 -0
- package/dist/enums/WorkspaceSectionType.mjs +11 -0
- package/dist/enums/WorkspaceSectionType.mjs.map +1 -0
- package/dist/handlers.mjs +24 -0
- package/dist/handlers.mjs.map +1 -1
- package/dist/hooks/useDebounce.mjs +5 -3
- package/dist/hooks/useDebounce.mjs.map +1 -1
- package/dist/hooks/useUploadProgress.mjs +33 -0
- package/dist/hooks/useUploadProgress.mjs.map +1 -0
- package/dist/i18n/messages/en-us.mjs +863 -3
- package/dist/i18n/messages/en-us.mjs.map +1 -1
- package/dist/i18n/messages/es-es.mjs +863 -3
- package/dist/i18n/messages/es-es.mjs.map +1 -1
- package/dist/i18n/messages/pt-br.mjs +863 -3
- package/dist/i18n/messages/pt-br.mjs.map +1 -1
- package/dist/index.mjs +87 -7
- package/dist/index.mjs.map +1 -1
- package/dist/infra/http/paged.mjs +20 -0
- package/dist/infra/http/paged.mjs.map +1 -0
- package/dist/middleware.mjs +2 -0
- package/dist/middleware.mjs.map +1 -1
- package/dist/middlewares/create-auth-middleware.mjs +1 -3
- package/dist/middlewares/create-auth-middleware.mjs.map +1 -1
- package/dist/middlewares/create-legacy-account-routes-middleware.mjs +44 -0
- package/dist/middlewares/create-legacy-account-routes-middleware.mjs.map +1 -0
- package/dist/middlewares/is-route-equals.mjs +7 -0
- package/dist/middlewares/is-route-equals.mjs.map +1 -0
- package/dist/modules/accounts/actions/account-management.action.mjs +20 -1
- package/dist/modules/accounts/actions/account-management.action.mjs.map +1 -1
- package/dist/modules/accounts/constants/account-hub-link.constants.mjs +9 -0
- package/dist/modules/accounts/constants/account-hub-link.constants.mjs.map +1 -0
- package/dist/modules/accounts/constants/legacy-account-routes.constants.mjs +5 -0
- package/dist/modules/accounts/constants/legacy-account-routes.constants.mjs.map +1 -0
- package/dist/modules/accounts/handlers/list-account-members.handler.mjs +22 -0
- package/dist/modules/accounts/handlers/list-account-members.handler.mjs.map +1 -0
- package/dist/modules/accounts/hooks/add-user-projects.hook.mjs +51 -0
- package/dist/modules/accounts/hooks/add-user-projects.hook.mjs.map +1 -0
- package/dist/modules/accounts/hooks/create-account-user.hook.mjs +20 -0
- package/dist/modules/accounts/hooks/create-account-user.hook.mjs.map +1 -0
- package/dist/modules/accounts/hooks/remove-user-projects.hook.mjs +47 -0
- package/dist/modules/accounts/hooks/remove-user-projects.hook.mjs.map +1 -0
- package/dist/modules/accounts/hooks/use-account-members.hook.mjs +20 -0
- package/dist/modules/accounts/hooks/use-account-members.hook.mjs.map +1 -0
- package/dist/modules/accounts/services/account.service.mjs +59 -0
- package/dist/modules/accounts/services/account.service.mjs.map +1 -1
- package/dist/modules/accounts/types/account-hub-link.type.mjs +1 -0
- package/dist/modules/accounts/types/account-hub-link.type.mjs.map +1 -0
- package/dist/modules/accounts/utils/build-account-hub-url.mjs +16 -0
- package/dist/modules/accounts/utils/build-account-hub-url.mjs.map +1 -0
- package/dist/modules/accounts/utils/is-account-hub-flow.mjs +9 -0
- package/dist/modules/accounts/utils/is-account-hub-flow.mjs.map +1 -0
- package/dist/modules/accounts/utils/is-account-section.mjs +9 -0
- package/dist/modules/accounts/utils/is-account-section.mjs.map +1 -0
- package/dist/modules/accounts/utils/is-my-account-section.mjs +13 -0
- package/dist/modules/accounts/utils/is-my-account-section.mjs.map +1 -0
- package/dist/modules/accounts/utils/map-legacy-account-route.mjs +93 -0
- package/dist/modules/accounts/utils/map-legacy-account-route.mjs.map +1 -0
- package/dist/modules/accounts/utils/parse-account-hub-link.mjs +20 -0
- package/dist/modules/accounts/utils/parse-account-hub-link.mjs.map +1 -0
- package/dist/modules/affiliates/actions/ensure-affiliate.action.mjs +10 -0
- package/dist/modules/affiliates/actions/ensure-affiliate.action.mjs.map +1 -0
- package/dist/modules/affiliates/actions/request-deposit.action.mjs +10 -0
- package/dist/modules/affiliates/actions/request-deposit.action.mjs.map +1 -0
- package/dist/modules/affiliates/actions/update-affiliate.action.mjs +10 -0
- package/dist/modules/affiliates/actions/update-affiliate.action.mjs.map +1 -0
- package/dist/modules/affiliates/constants/affiliate.constants.mjs +11 -0
- package/dist/modules/affiliates/constants/affiliate.constants.mjs.map +1 -0
- package/dist/modules/affiliates/constants/query-keys.constants.mjs +15 -0
- package/dist/modules/affiliates/constants/query-keys.constants.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/affiliate-report-analytics.handler.mjs +16 -0
- package/dist/modules/affiliates/handlers/affiliate-report-analytics.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/affiliate-withdrawal-limits.handler.mjs +12 -0
- package/dist/modules/affiliates/handlers/affiliate-withdrawal-limits.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/current-affiliate.handler.mjs +12 -0
- package/dist/modules/affiliates/handlers/current-affiliate.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/list-affiliate-coupons.handler.mjs +12 -0
- package/dist/modules/affiliates/handlers/list-affiliate-coupons.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/list-affiliate-leads.handler.mjs +22 -0
- package/dist/modules/affiliates/handlers/list-affiliate-leads.handler.mjs.map +1 -0
- package/dist/modules/affiliates/handlers/list-affiliate-transactions.handler.mjs +22 -0
- package/dist/modules/affiliates/handlers/list-affiliate-transactions.handler.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-affiliate-coupons.hook.mjs +17 -0
- package/dist/modules/affiliates/hooks/use-affiliate-coupons.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-affiliate-leads.hook.mjs +22 -0
- package/dist/modules/affiliates/hooks/use-affiliate-leads.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-affiliate-report-analytics.hook.mjs +17 -0
- package/dist/modules/affiliates/hooks/use-affiliate-report-analytics.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-affiliate-transactions.hook.mjs +20 -0
- package/dist/modules/affiliates/hooks/use-affiliate-transactions.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-current-affiliate.hook.mjs +17 -0
- package/dist/modules/affiliates/hooks/use-current-affiliate.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-ensure-affiliate.hook.mjs +23 -0
- package/dist/modules/affiliates/hooks/use-ensure-affiliate.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-request-deposit.hook.mjs +28 -0
- package/dist/modules/affiliates/hooks/use-request-deposit.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-update-affiliate.hook.mjs +22 -0
- package/dist/modules/affiliates/hooks/use-update-affiliate.hook.mjs.map +1 -0
- package/dist/modules/affiliates/hooks/use-withdrawal-limits.hook.mjs +17 -0
- package/dist/modules/affiliates/hooks/use-withdrawal-limits.hook.mjs.map +1 -0
- package/dist/modules/affiliates/services/affiliates.service.mjs +183 -0
- package/dist/modules/affiliates/services/affiliates.service.mjs.map +1 -0
- package/dist/modules/affiliates/types/affiliate.type.mjs +100 -0
- package/dist/modules/affiliates/types/affiliate.type.mjs.map +1 -0
- package/dist/modules/affiliates/utils/get-affiliate-share-link.mjs +9 -0
- package/dist/modules/affiliates/utils/get-affiliate-share-link.mjs.map +1 -0
- package/dist/modules/charges/actions/get-nota-fiscal.action.mjs +10 -0
- package/dist/modules/charges/actions/get-nota-fiscal.action.mjs.map +1 -0
- package/dist/modules/charges/actions/refresh-pix.action.mjs +10 -0
- package/dist/modules/charges/actions/refresh-pix.action.mjs.map +1 -0
- package/dist/modules/charges/hooks/nota-fiscal.hook.mjs +13 -0
- package/dist/modules/charges/hooks/nota-fiscal.hook.mjs.map +1 -0
- package/dist/modules/charges/hooks/refresh-pix.hook.mjs +13 -0
- package/dist/modules/charges/hooks/refresh-pix.hook.mjs.map +1 -0
- package/dist/modules/charges/services/charges.service.mjs +67 -0
- package/dist/modules/charges/services/charges.service.mjs.map +1 -1
- package/dist/modules/charges/types/nota-fiscal.type.mjs +1 -0
- package/dist/modules/charges/types/nota-fiscal.type.mjs.map +1 -0
- package/dist/modules/charges/types/refresh-pix.type.mjs +1 -0
- package/dist/modules/charges/types/refresh-pix.type.mjs.map +1 -0
- package/dist/modules/charges/utils/get-charge-download-url.mjs +8 -0
- package/dist/modules/charges/utils/get-charge-download-url.mjs.map +1 -0
- package/dist/modules/coupons/constants/query-keys.constants.mjs +5 -0
- package/dist/modules/coupons/constants/query-keys.constants.mjs.map +1 -0
- package/dist/modules/coupons/handlers/find-coupon-by-code.handler.mjs +17 -0
- package/dist/modules/coupons/handlers/find-coupon-by-code.handler.mjs.map +1 -0
- package/dist/modules/coupons/handlers/find-coupon-by-id.handler.mjs +16 -0
- package/dist/modules/coupons/handlers/find-coupon-by-id.handler.mjs.map +1 -0
- package/dist/modules/coupons/hooks/use-coupon-by-code.hook.mjs +15 -0
- package/dist/modules/coupons/hooks/use-coupon-by-code.hook.mjs.map +1 -0
- package/dist/modules/coupons/hooks/use-coupon-by-id.hook.mjs +18 -0
- package/dist/modules/coupons/hooks/use-coupon-by-id.hook.mjs.map +1 -0
- package/dist/modules/coupons/services/coupons.service.mjs +44 -0
- package/dist/modules/coupons/services/coupons.service.mjs.map +1 -0
- package/dist/modules/coupons/types/coupon.type.mjs +61 -0
- package/dist/modules/coupons/types/coupon.type.mjs.map +1 -0
- package/dist/modules/coupons/utils/coupon-restrictions.mjs +60 -0
- package/dist/modules/coupons/utils/coupon-restrictions.mjs.map +1 -0
- package/dist/modules/domains/handlers/count-domains.handler.mjs +12 -0
- package/dist/modules/domains/handlers/count-domains.handler.mjs.map +1 -0
- package/dist/modules/domains/hooks/count-domains.hook.mjs +17 -0
- package/dist/modules/domains/hooks/count-domains.hook.mjs.map +1 -0
- package/dist/modules/domains/services/domains.service.mjs +18 -0
- package/dist/modules/domains/services/domains.service.mjs.map +1 -0
- package/dist/modules/ia-credits/handlers/list-ia-credit-operations.handler.mjs +15 -0
- package/dist/modules/ia-credits/handlers/list-ia-credit-operations.handler.mjs.map +1 -0
- package/dist/modules/ia-credits/hooks/ia-credit-operations.hook.mjs +28 -0
- package/dist/modules/ia-credits/hooks/ia-credit-operations.hook.mjs.map +1 -0
- package/dist/modules/ia-credits/services/ia-credits.service.mjs +23 -2
- package/dist/modules/ia-credits/services/ia-credits.service.mjs.map +1 -1
- package/dist/modules/pages/handlers/count-pages.handler.mjs +4 -2
- package/dist/modules/pages/handlers/count-pages.handler.mjs.map +1 -1
- package/dist/modules/pages/hooks/count-published-pages.hook.mjs +26 -0
- package/dist/modules/pages/hooks/count-published-pages.hook.mjs.map +1 -0
- package/dist/modules/pages/services/pages.service.mjs +3 -2
- package/dist/modules/pages/services/pages.service.mjs.map +1 -1
- package/dist/modules/plans/constants/plan-tooltips.constants.mjs +14 -0
- package/dist/modules/plans/constants/plan-tooltips.constants.mjs.map +1 -0
- package/dist/modules/plans/hooks/use-enriched-plans.hook.mjs +28 -0
- package/dist/modules/plans/hooks/use-enriched-plans.hook.mjs.map +1 -0
- package/dist/modules/plans/hooks/use-ui-plans.hook.mjs +20 -0
- package/dist/modules/plans/hooks/use-ui-plans.hook.mjs.map +1 -0
- package/dist/modules/projects/hooks/add-project-users.hook.mjs +25 -0
- package/dist/modules/projects/hooks/add-project-users.hook.mjs.map +1 -0
- package/dist/modules/projects/hooks/list-all-account-users.hook.mjs +3 -6
- package/dist/modules/projects/hooks/list-all-account-users.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/list-available-users.hook.mjs +3 -6
- package/dist/modules/projects/hooks/list-available-users.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/list-infinite-projects.hook.mjs +3 -6
- package/dist/modules/projects/hooks/list-infinite-projects.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/list-project-users.hook.mjs +3 -6
- package/dist/modules/projects/hooks/list-project-users.hook.mjs.map +1 -1
- package/dist/modules/projects/hooks/remove-project-users.hook.mjs +25 -0
- package/dist/modules/projects/hooks/remove-project-users.hook.mjs.map +1 -0
- package/dist/modules/projects/services/project-users.service.mjs +5 -0
- package/dist/modules/projects/services/project-users.service.mjs.map +1 -1
- package/dist/modules/projects/types.mjs +3 -2
- package/dist/modules/projects/types.mjs.map +1 -1
- package/dist/modules/subscriptions/actions/cancel-subscription.action.mjs +10 -0
- package/dist/modules/subscriptions/actions/cancel-subscription.action.mjs.map +1 -0
- package/dist/modules/subscriptions/actions/create-subscription.action.mjs +10 -0
- package/dist/modules/subscriptions/actions/create-subscription.action.mjs.map +1 -0
- package/dist/modules/subscriptions/actions/find-pending-pix-status.action.mjs +10 -0
- package/dist/modules/subscriptions/actions/find-pending-pix-status.action.mjs.map +1 -0
- package/dist/modules/subscriptions/actions/find-subscription-by-id.action.mjs +10 -0
- package/dist/modules/subscriptions/actions/find-subscription-by-id.action.mjs.map +1 -0
- package/dist/modules/subscriptions/constants/addons.constants.mjs +35 -0
- package/dist/modules/subscriptions/constants/addons.constants.mjs.map +1 -1
- package/dist/modules/subscriptions/constants/downgrade.constants.mjs +25 -0
- package/dist/modules/subscriptions/constants/downgrade.constants.mjs.map +1 -0
- package/dist/modules/subscriptions/constants/subscription.constants.mjs +2 -0
- package/dist/modules/subscriptions/constants/subscription.constants.mjs.map +1 -1
- package/dist/modules/subscriptions/handlers/pending-pix-status.handler.mjs +15 -0
- package/dist/modules/subscriptions/handlers/pending-pix-status.handler.mjs.map +1 -0
- package/dist/modules/subscriptions/hooks/cancel-subscription.hook.mjs +25 -0
- package/dist/modules/subscriptions/hooks/cancel-subscription.hook.mjs.map +1 -0
- package/dist/modules/subscriptions/hooks/create-subscription.hook.mjs +33 -0
- package/dist/modules/subscriptions/hooks/create-subscription.hook.mjs.map +1 -0
- package/dist/modules/subscriptions/hooks/find-subscription-by-id.hook.mjs +18 -0
- package/dist/modules/subscriptions/hooks/find-subscription-by-id.hook.mjs.map +1 -0
- package/dist/modules/subscriptions/hooks/pending-pix-status.hook.mjs +25 -0
- package/dist/modules/subscriptions/hooks/pending-pix-status.hook.mjs.map +1 -0
- package/dist/modules/subscriptions/services/subscriptions.service.mjs +71 -0
- package/dist/modules/subscriptions/services/subscriptions.service.mjs.map +1 -1
- package/dist/modules/subscriptions/types/cancel-subscription.type.mjs +9 -0
- package/dist/modules/subscriptions/types/cancel-subscription.type.mjs.map +1 -0
- package/dist/modules/subscriptions/types/create-subscription.type.mjs +62 -0
- package/dist/modules/subscriptions/types/create-subscription.type.mjs.map +1 -0
- package/dist/modules/subscriptions/types/pending-pix-status.type.mjs +28 -0
- package/dist/modules/subscriptions/types/pending-pix-status.type.mjs.map +1 -0
- package/dist/modules/subscriptions/types/subscription.type.mjs +9 -1
- package/dist/modules/subscriptions/types/subscription.type.mjs.map +1 -1
- package/dist/modules/subscriptions/utils/addon-buckets.mjs +69 -0
- package/dist/modules/subscriptions/utils/addon-buckets.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/confirm-payment-if-required.mjs +8 -2
- package/dist/modules/subscriptions/utils/confirm-payment-if-required.mjs.map +1 -1
- package/dist/modules/subscriptions/utils/first-period-pricing.mjs +25 -0
- package/dist/modules/subscriptions/utils/first-period-pricing.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/is-api-subscription.mjs +8 -0
- package/dist/modules/subscriptions/utils/is-api-subscription.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/is-boleto-payer.mjs +17 -0
- package/dist/modules/subscriptions/utils/is-boleto-payer.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/is-free-subscription.mjs +8 -0
- package/dist/modules/subscriptions/utils/is-free-subscription.mjs.map +1 -0
- package/dist/modules/subscriptions/utils/periodicity.mjs +55 -1
- package/dist/modules/subscriptions/utils/periodicity.mjs.map +1 -1
- package/dist/modules/subscriptions/utils/resolve-subscription-plan-name.mjs +27 -0
- package/dist/modules/subscriptions/utils/resolve-subscription-plan-name.mjs.map +1 -0
- package/dist/modules/users/hooks/messages.hook.mjs +3 -5
- package/dist/modules/users/hooks/messages.hook.mjs.map +1 -1
- package/dist/server.mjs +6 -0
- package/dist/server.mjs.map +1 -1
- package/dist/store/useAccountModals.mjs +9 -2
- package/dist/store/useAccountModals.mjs.map +1 -1
- package/dist/store/useAffiliateFlows.mjs +23 -0
- package/dist/store/useAffiliateFlows.mjs.map +1 -0
- package/dist/store/useProjectFlows.mjs +18 -0
- package/dist/store/useProjectFlows.mjs.map +1 -0
- package/dist/store/useSubscriptionFlows.mjs +58 -0
- package/dist/store/useSubscriptionFlows.mjs.map +1 -0
- package/dist/store/useTeamFlows.mjs +15 -0
- package/dist/store/useTeamFlows.mjs.map +1 -0
- package/dist/testing/factories/coupon.factory.mjs +19 -0
- package/dist/testing/factories/coupon.factory.mjs.map +1 -0
- package/dist/testing/factories/index.mjs +6 -0
- package/dist/testing/factories/index.mjs.map +1 -1
- package/dist/testing/factories/project-user.factory.mjs +17 -0
- package/dist/testing/factories/project-user.factory.mjs.map +1 -0
- package/dist/testing/factories/project.factory.mjs +21 -0
- package/dist/testing/factories/project.factory.mjs.map +1 -0
- package/dist/testing/react/providers.mjs +1 -1
- package/dist/testing/react/providers.mjs.map +1 -1
- package/dist/utils/browser/chart-custom-tooltip.mjs +69 -0
- package/dist/utils/browser/chart-custom-tooltip.mjs.map +1 -0
- package/dist/utils/browser/get-css-variable.mjs +9 -0
- package/dist/utils/browser/get-css-variable.mjs.map +1 -0
- package/dist/utils/constants/scrollbar.mjs +5 -0
- package/dist/utils/constants/scrollbar.mjs.map +1 -0
- package/dist/utils/date-filter-period.mjs +34 -0
- package/dist/utils/date-filter-period.mjs.map +1 -0
- package/dist/utils/file/index.mjs +11 -1
- package/dist/utils/file/index.mjs.map +1 -1
- package/dist/utils/format/initials.mjs +8 -0
- package/dist/utils/format/initials.mjs.map +1 -0
- package/dist/utils/format/masks.mjs +32 -1
- package/dist/utils/format/masks.mjs.map +1 -1
- package/dist/utils/qrcode/to-data-url.mjs +12 -0
- package/dist/utils/qrcode/to-data-url.mjs.map +1 -0
- package/dist/utils/validators/account.mjs +1 -7
- package/dist/utils/validators/account.mjs.map +1 -1
- package/package.json +15 -2
- package/src/components/account/AccountHubLinkHandler.tsx +39 -0
- package/src/components/account/AccountModalLayout.tsx +190 -0
- package/src/components/account/AccountModals.tsx +12 -2
- package/src/components/account/DeleteAccountModal.tsx +1 -1
- package/src/components/account/IsntPossibleDeleteAccountModal.tsx +9 -1
- package/src/components/account/MyAccountModal.tsx +215 -0
- package/src/components/account/TwoFactorAuthModal.tsx +1 -1
- package/src/components/account/hooks/useAccountHubActions.ts +95 -0
- package/src/components/account/hooks/useAddCardWithPaymentSwitch.ts +70 -0
- package/src/components/account/hooks/useAffiliatesActions.tsx +78 -0
- package/src/components/account/hooks/useMyAccountModal.ts +40 -0
- package/src/components/account/hooks/useProjectsActions.ts +44 -0
- package/src/components/account/hooks/useSubscriptionActions.ts +99 -0
- package/src/components/account/hooks/useTeamActions.ts +35 -0
- package/src/components/account/sections/AffiliatesSection.tsx +342 -0
- package/src/components/account/sections/ChangePasswordSection.tsx +6 -10
- package/src/components/account/sections/MyProfileSection.tsx +207 -143
- package/src/components/account/sections/PreferencesSection.tsx +55 -51
- package/src/components/account/sections/ProjectsSection.tsx +110 -0
- package/src/components/account/sections/SecuritySection.tsx +72 -62
- package/src/components/account/sections/SubscriptionSection.tsx +36 -0
- package/src/components/account/sections/TeamSection.tsx +161 -0
- package/src/components/account/sections/TokenSection.tsx +4 -8
- package/src/components/account/sections/affiliates/AffiliateCommissionCard.tsx +83 -0
- package/src/components/account/sections/affiliates/AffiliateFlows.tsx +20 -0
- package/src/components/account/sections/affiliates/AffiliateLeadsSheet.tsx +143 -0
- package/src/components/account/sections/affiliates/AffiliateStatsCard.tsx +56 -0
- package/src/components/account/sections/affiliates/AffiliateStepCard.tsx +20 -0
- package/src/components/account/sections/affiliates/AffiliateTransactionsList.tsx +194 -0
- package/src/components/account/sections/affiliates/NoReceivingAccountModal.tsx +63 -0
- package/src/components/account/sections/affiliates/ReceivingAccountModal.tsx +213 -0
- package/src/components/account/sections/affiliates/RequestWithdrawalSheet.tsx +586 -0
- package/src/components/account/sections/affiliates/ViewAttachmentModal.tsx +47 -0
- package/src/components/account/sections/affiliates/reports/AffiliatesIndicatorsChart.tsx +45 -0
- package/src/components/account/sections/affiliates/reports/AffiliatesReportsTab.tsx +44 -0
- package/src/components/account/sections/affiliates/reports/useAffiliatesIndicatorsChart.ts +148 -0
- package/src/components/account/sections/projects/DeleteProjectModal.tsx +246 -0
- package/src/components/account/sections/projects/ProjectFlows.tsx +16 -0
- package/src/components/account/sections/projects/ProjectMembersStack.tsx +75 -0
- package/src/components/account/sections/projects/ProjectRow.tsx +96 -0
- package/src/components/account/sections/projects/ProjectSheet.tsx +603 -0
- package/src/components/account/sections/projects/ProjectsDisabledModal.tsx +69 -0
- package/src/components/account/sections/projects/project-form.schema.ts +30 -0
- package/src/components/account/sections/shared/ConnectListRow.tsx +68 -0
- package/src/components/account/sections/shared/DateFilterPopover.tsx +58 -0
- package/src/components/account/sections/shared/EntityAvatar.tsx +54 -0
- package/src/components/account/sections/shared/FilterPopover.tsx +79 -0
- package/src/components/account/sections/shared/FormSection.tsx +23 -0
- package/src/components/account/sections/shared/IconBox.tsx +21 -0
- package/src/components/account/sections/shared/InfiniteScrollList.tsx +57 -0
- package/src/components/account/sections/shared/ListPagination.tsx +84 -0
- package/src/components/account/sections/shared/RowActionsMenu.tsx +66 -0
- package/src/components/account/sections/shared/SectionLoadError.tsx +27 -0
- package/src/components/account/sections/shared/StatusBadge.tsx +33 -0
- package/src/components/account/sections/shared/WorkspaceSection.tsx +22 -0
- package/src/components/account/sections/subscription/AiCreditsUsage.tsx +152 -0
- package/src/components/account/sections/subscription/BillingAddressSheet.tsx +460 -0
- package/src/components/account/sections/subscription/BoletoDetailsDialog.tsx +104 -0
- package/src/components/account/sections/subscription/BoletoGeneratedDialog.tsx +24 -0
- package/src/components/account/sections/subscription/CancelPlanDialog.tsx +221 -0
- package/src/components/account/sections/subscription/ChargeRow.tsx +161 -0
- package/src/components/account/sections/subscription/ChargeStatusBadge.tsx +29 -0
- package/src/components/account/sections/subscription/ChargesList.tsx +125 -0
- package/src/components/account/sections/subscription/ManageCardsSheet.tsx +93 -0
- package/src/components/account/sections/subscription/OverdueReceiptOpener.tsx +29 -0
- package/src/components/account/sections/subscription/PayChargeDialog.tsx +306 -0
- package/src/components/account/sections/subscription/PaymentConfirmationDialog.tsx +70 -0
- package/src/components/account/sections/subscription/PaymentMethodsCard.tsx +117 -0
- package/src/components/account/sections/subscription/PendingChangeDialog.tsx +168 -0
- package/src/components/account/sections/subscription/PixDetailsDialog.tsx +246 -0
- package/src/components/account/sections/subscription/PixPaymentDialog.tsx +242 -0
- package/src/components/account/sections/subscription/PlanDetailsSheet.tsx +380 -0
- package/src/components/account/sections/subscription/ReceiptDetailsSheet.tsx +318 -0
- package/src/components/account/sections/subscription/SubscriptionFlows.tsx +40 -0
- package/src/components/account/sections/subscription/SubscriptionPlanCard.tsx +433 -0
- package/src/components/account/sections/subscription/UsageReportSheet.tsx +244 -0
- package/src/components/account/sections/subscription/change-plan/ChangePlanSheet.tsx +95 -0
- package/src/components/account/sections/subscription/change-plan/components/AbTestDetailsDialog.tsx +57 -0
- package/src/components/account/sections/subscription/change-plan/components/AddonsBlock.tsx +214 -0
- package/src/components/account/sections/subscription/change-plan/components/AlternativeBucketsSection.tsx +92 -0
- package/src/components/account/sections/subscription/change-plan/components/CouponBlock.tsx +42 -0
- package/src/components/account/sections/subscription/change-plan/components/CouponDialog.tsx +134 -0
- package/src/components/account/sections/subscription/change-plan/components/PricePreview.tsx +28 -0
- package/src/components/account/sections/subscription/change-plan/components/SummaryBlock.tsx +194 -0
- package/src/components/account/sections/subscription/change-plan/plan-comparison.ts +52 -0
- package/src/components/account/sections/subscription/change-plan/steps/PaymentSummaryStep.tsx +161 -0
- package/src/components/account/sections/subscription/change-plan/steps/PlanComparisonStep.tsx +165 -0
- package/src/components/account/sections/subscription/change-plan/steps/PlanViewStep.tsx +89 -0
- package/src/components/account/sections/subscription/change-plan/steps/ReactivationConfigStep.tsx +117 -0
- package/src/components/account/sections/subscription/change-plan/steps/ReactivationPaymentStep.tsx +139 -0
- package/src/components/account/sections/subscription/change-plan/useChangePlanState.tsx +1158 -0
- package/src/components/account/sections/subscription/downgrade/CannotDowngradeDialog.tsx +297 -0
- package/src/components/account/sections/subscription/downgrade/DowngradeReasonDialog.tsx +154 -0
- package/src/components/account/sections/subscription/plans/PlanCard.tsx +417 -0
- package/src/components/account/sections/subscription/plans/PlanCardSkeleton.tsx +70 -0
- package/src/components/account/sections/subscription/plans/PlansCatalogDialog.tsx +156 -0
- package/src/components/account/sections/team/DeleteUserModal.tsx +134 -0
- package/src/components/account/sections/team/TeamFlows.tsx +14 -0
- package/src/components/account/sections/team/TeamMemberRow.tsx +151 -0
- package/src/components/account/sections/team/UserSheet.tsx +688 -0
- package/src/components/account/sections/team/steps/NotificationsStep.tsx +109 -0
- package/src/components/account/sections/team/steps/ProjectSelectionStep.tsx +219 -0
- package/src/components/account/sections/team/steps/UserInformationStep.tsx +423 -0
- package/src/components/account/sections/team/user-form.schema.ts +43 -0
- package/src/components/account/types/workspace-actions.type.ts +56 -0
- package/src/components/layouts/ProfilePopover.tsx +11 -12
- package/src/components/layouts/UsersSelectorPopover.tsx +7 -4
- package/src/components/modals/AccountDeletionWarningModal.tsx +4 -5
- package/src/components/modals/AccountFrozenModal.tsx +6 -3
- package/src/components/modals/Modals.tsx +6 -3
- package/src/components/modals/PaidPlanRequiredModal.tsx +4 -5
- package/src/components/modals/cards/AddFirstCardWarningModal.tsx +72 -0
- package/src/components/modals/cards/SwitchPaymentToCardModal.tsx +232 -0
- package/src/components/modals/promo/AiCreditsOfferModal/AiCreditsOfferModal.tsx +5 -4
- package/src/components/ui/data-display/CardItem.tsx +9 -5
- package/src/components/ui/data-display/PaymentMethodIcons.tsx +43 -0
- package/src/components/ui/form/BillingPeriodSelector.tsx +173 -0
- package/src/components/ui/form/PaymentMethodToggle.tsx +119 -0
- package/src/components/ui/form/RadioOptionFieldIcon.tsx +64 -0
- package/src/components/ui/form/SegmentedControl.tsx +77 -0
- package/src/components/ui/overlay/Dialog.tsx +21 -2
- package/src/components/ui/overlay/Sheet.tsx +26 -5
- package/src/components/ui/overlay/layers.tsx +88 -4
- package/src/enums/AccountHubFlow.ts +8 -0
- package/src/enums/DateFilterPeriod.ts +17 -0
- package/src/enums/WorkspaceSectionType.ts +6 -0
- package/src/handlers.ts +14 -0
- package/src/hooks/useDebounce.ts +5 -3
- package/src/hooks/useUploadProgress.ts +42 -0
- package/src/i18n/messages/en-us.ts +904 -2
- package/src/i18n/messages/es-es.ts +908 -2
- package/src/i18n/messages/pt-br.ts +908 -2
- package/src/index.ts +56 -1
- package/src/infra/http/paged.ts +24 -0
- package/src/middleware.ts +1 -0
- package/src/middlewares/create-auth-middleware.ts +1 -4
- package/src/middlewares/create-legacy-account-routes-middleware.ts +54 -0
- package/src/middlewares/is-route-equals.ts +3 -0
- package/src/modules/accounts/actions/account-management.action.ts +22 -1
- package/src/modules/accounts/constants/account-hub-link.constants.ts +3 -0
- package/src/modules/accounts/constants/legacy-account-routes.constants.ts +1 -0
- package/src/modules/accounts/handlers/list-account-members.handler.ts +23 -0
- package/src/modules/accounts/hooks/add-user-projects.hook.ts +72 -0
- package/src/modules/accounts/hooks/create-account-user.hook.ts +21 -0
- package/src/modules/accounts/hooks/remove-user-projects.hook.ts +68 -0
- package/src/modules/accounts/hooks/use-account-members.hook.ts +31 -0
- package/src/modules/accounts/services/account.service.ts +71 -0
- package/src/modules/accounts/types/account-hub-link.type.ts +13 -0
- package/src/modules/accounts/types.ts +9 -0
- package/src/modules/accounts/utils/build-account-hub-url.ts +14 -0
- package/src/modules/accounts/utils/is-account-hub-flow.ts +7 -0
- package/src/modules/accounts/utils/is-account-section.ts +7 -0
- package/src/modules/accounts/utils/is-my-account-section.ts +12 -0
- package/src/modules/accounts/utils/map-legacy-account-route.ts +108 -0
- package/src/modules/accounts/utils/parse-account-hub-link.ts +21 -0
- package/src/modules/affiliates/actions/ensure-affiliate.action.ts +9 -0
- package/src/modules/affiliates/actions/request-deposit.action.ts +9 -0
- package/src/modules/affiliates/actions/update-affiliate.action.ts +9 -0
- package/src/modules/affiliates/constants/affiliate.constants.ts +11 -0
- package/src/modules/affiliates/constants/query-keys.constants.ts +7 -0
- package/src/modules/affiliates/handlers/affiliate-report-analytics.handler.ts +16 -0
- package/src/modules/affiliates/handlers/affiliate-withdrawal-limits.handler.ts +10 -0
- package/src/modules/affiliates/handlers/current-affiliate.handler.ts +10 -0
- package/src/modules/affiliates/handlers/list-affiliate-coupons.handler.ts +10 -0
- package/src/modules/affiliates/handlers/list-affiliate-leads.handler.ts +23 -0
- package/src/modules/affiliates/handlers/list-affiliate-transactions.handler.ts +23 -0
- package/src/modules/affiliates/hooks/use-affiliate-coupons.hook.ts +19 -0
- package/src/modules/affiliates/hooks/use-affiliate-leads.hook.ts +27 -0
- package/src/modules/affiliates/hooks/use-affiliate-report-analytics.hook.ts +19 -0
- package/src/modules/affiliates/hooks/use-affiliate-transactions.hook.ts +25 -0
- package/src/modules/affiliates/hooks/use-current-affiliate.hook.ts +19 -0
- package/src/modules/affiliates/hooks/use-ensure-affiliate.hook.ts +24 -0
- package/src/modules/affiliates/hooks/use-request-deposit.hook.ts +29 -0
- package/src/modules/affiliates/hooks/use-update-affiliate.hook.ts +24 -0
- package/src/modules/affiliates/hooks/use-withdrawal-limits.hook.ts +20 -0
- package/src/modules/affiliates/services/affiliates.service.ts +240 -0
- package/src/modules/affiliates/types/affiliate.type.ts +180 -0
- package/src/modules/affiliates/utils/get-affiliate-share-link.ts +8 -0
- package/src/modules/charges/actions/get-nota-fiscal.action.ts +8 -0
- package/src/modules/charges/actions/refresh-pix.action.ts +8 -0
- package/src/modules/charges/hooks/nota-fiscal.hook.ts +13 -0
- package/src/modules/charges/hooks/refresh-pix.hook.ts +13 -0
- package/src/modules/charges/services/charges.service.ts +121 -0
- package/src/modules/charges/types/nota-fiscal.type.ts +20 -0
- package/src/modules/charges/types/refresh-pix.type.ts +14 -0
- package/src/modules/charges/utils/get-charge-download-url.ts +10 -0
- package/src/modules/coupons/constants/query-keys.constants.ts +1 -0
- package/src/modules/coupons/handlers/find-coupon-by-code.handler.ts +16 -0
- package/src/modules/coupons/handlers/find-coupon-by-id.handler.ts +15 -0
- package/src/modules/coupons/hooks/use-coupon-by-code.hook.ts +16 -0
- package/src/modules/coupons/hooks/use-coupon-by-id.hook.ts +20 -0
- package/src/modules/coupons/services/coupons.service.ts +54 -0
- package/src/modules/coupons/types/coupon.type.ts +70 -0
- package/src/modules/coupons/utils/coupon-restrictions.ts +112 -0
- package/src/modules/domains/handlers/count-domains.handler.ts +10 -0
- package/src/modules/domains/hooks/count-domains.hook.ts +17 -0
- package/src/modules/domains/services/domains.service.ts +18 -0
- package/src/modules/ia-credits/handlers/list-ia-credit-operations.handler.ts +14 -0
- package/src/modules/ia-credits/hooks/ia-credit-operations.hook.ts +33 -0
- package/src/modules/ia-credits/services/ia-credits.service.ts +32 -1
- package/src/modules/pages/handlers/count-pages.handler.ts +5 -2
- package/src/modules/pages/hooks/count-published-pages.hook.ts +26 -0
- package/src/modules/pages/services/pages.service.ts +3 -2
- package/src/modules/plans/constants/plan-tooltips.constants.ts +16 -0
- package/src/modules/plans/hooks/use-enriched-plans.hook.ts +31 -0
- package/src/modules/plans/hooks/use-ui-plans.hook.ts +22 -0
- package/src/modules/projects/hooks/add-project-users.hook.ts +29 -0
- package/src/modules/projects/hooks/list-all-account-users.hook.ts +3 -6
- package/src/modules/projects/hooks/list-available-users.hook.ts +3 -6
- package/src/modules/projects/hooks/list-infinite-projects.hook.ts +3 -6
- package/src/modules/projects/hooks/list-project-users.hook.ts +3 -6
- package/src/modules/projects/hooks/remove-project-users.hook.ts +29 -0
- package/src/modules/projects/services/project-users.service.ts +135 -130
- package/src/modules/projects/types.ts +89 -88
- package/src/modules/subscriptions/actions/cancel-subscription.action.ts +12 -0
- package/src/modules/subscriptions/actions/create-subscription.action.ts +9 -0
- package/src/modules/subscriptions/actions/find-pending-pix-status.action.ts +8 -0
- package/src/modules/subscriptions/actions/find-subscription-by-id.action.ts +8 -0
- package/src/modules/subscriptions/constants/addons.constants.ts +50 -0
- package/src/modules/subscriptions/constants/downgrade.constants.ts +30 -0
- package/src/modules/subscriptions/constants/subscription.constants.ts +3 -0
- package/src/modules/subscriptions/handlers/pending-pix-status.handler.ts +17 -0
- package/src/modules/subscriptions/hooks/cancel-subscription.hook.ts +28 -0
- package/src/modules/subscriptions/hooks/create-subscription.hook.ts +34 -0
- package/src/modules/subscriptions/hooks/find-subscription-by-id.hook.ts +17 -0
- package/src/modules/subscriptions/hooks/pending-pix-status.hook.ts +30 -0
- package/src/modules/subscriptions/services/subscriptions.service.ts +401 -301
- package/src/modules/subscriptions/types/cancel-subscription.type.ts +8 -0
- package/src/modules/subscriptions/types/create-subscription.type.ts +79 -0
- package/src/modules/subscriptions/types/pending-pix-status.type.ts +33 -0
- package/src/modules/subscriptions/types/subscription.type.ts +157 -147
- package/src/modules/subscriptions/utils/addon-buckets.ts +129 -0
- package/src/modules/subscriptions/utils/confirm-payment-if-required.ts +9 -2
- package/src/modules/subscriptions/utils/first-period-pricing.ts +63 -0
- package/src/modules/subscriptions/utils/is-api-subscription.ts +6 -0
- package/src/modules/subscriptions/utils/is-boleto-payer.ts +21 -0
- package/src/modules/subscriptions/utils/is-free-subscription.ts +6 -0
- package/src/modules/subscriptions/utils/periodicity.ts +101 -0
- package/src/modules/subscriptions/utils/resolve-subscription-plan-name.ts +44 -0
- package/src/modules/users/hooks/messages.hook.ts +3 -5
- package/src/server.ts +102 -99
- package/src/store/useAccountModals.ts +22 -5
- package/src/store/useAffiliateFlows.ts +46 -0
- package/src/store/useProjectFlows.ts +42 -0
- package/src/store/useSubscriptionFlows.ts +176 -0
- package/src/store/useTeamFlows.ts +34 -0
- package/src/testing/factories/coupon.factory.ts +17 -0
- package/src/testing/factories/index.ts +3 -0
- package/src/testing/factories/project-user.factory.ts +15 -0
- package/src/testing/factories/project.factory.ts +19 -0
- package/src/testing/react/providers.tsx +2 -1
- package/src/utils/browser/chart-custom-tooltip.ts +85 -0
- package/src/utils/browser/get-css-variable.ts +6 -0
- package/src/utils/constants/scrollbar.ts +10 -0
- package/src/utils/date-filter-period.ts +34 -0
- package/src/utils/file/index.ts +13 -0
- package/src/utils/format/initials.ts +10 -0
- package/src/utils/format/masks.ts +41 -0
- package/src/utils/qrcode/to-data-url.ts +23 -0
- package/src/utils/validators/account.ts +0 -8
- package/dist/components/account/ConfigurationsMyAccountModal.mjs +0 -143
- package/dist/components/account/ConfigurationsMyAccountModal.mjs.map +0 -1
- package/dist/components/account/hooks/useConfigurationsModal.mjs +0 -34
- package/dist/components/account/hooks/useConfigurationsModal.mjs.map +0 -1
- package/src/components/account/ConfigurationsMyAccountModal.tsx +0 -179
- package/src/components/account/hooks/useConfigurationsModal.ts +0 -45
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/projects/ProjectsDisabledModal.tsx"],"sourcesContent":["'use client';\n\nimport { IconAlertTriangle } from '@tabler/icons-react';\nimport { useTranslations } from 'next-intl';\nimport { Button } from '../../../ui/buttons/Button';\nimport { Separator } from '../../../ui/data-display/Separator';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '../../../ui/overlay/Dialog';\nimport { useManagementPermissions } from '../../../../modules/auth/hooks/useManagementPermissions';\nimport { useProjectFlows } from '../../../../store/useProjectFlows';\nimport useSubscriptionActions from '../../hooks/useSubscriptionActions';\n\n/** Aviso de plano sem Gestão de Projetos, com o caminho para o upgrade. */\nexport function ProjectsDisabledModal() {\n const translate = useTranslations();\n const { isOwnerOrAdmin } = useManagementPermissions();\n const isOpen = useProjectFlows((state) => state.isProjectsDisabledOpen);\n const closeProjectsDisabled = useProjectFlows((state) => state.closeProjectsDisabled);\n const subscriptionActions = useSubscriptionActions();\n\n const handleUpgrade = () => {\n closeProjectsDisabled();\n subscriptionActions.choosePlan();\n };\n\n return (\n <Dialog open={isOpen} onOpenChange={(nextOpen) => !nextOpen && closeProjectsDisabled()}>\n <DialogContent\n onOpenAutoFocus={(event) => event.preventDefault()}\n className=\"flex flex-col p-0 gap-0 md:w-[410px]! lg:w-[410px]! max-w-[410px]! max-[410px]:w-[calc(100%-32px)] duration-0!\"\n >\n <DialogHeader className=\"gap-3 text-left p-5\">\n <div className=\"flex items-center justify-center w-10 h-10 bg-gray-100 rounded-lg\">\n <IconAlertTriangle size={20} className=\"text-gray-950\" />\n </div>\n <div className=\"flex flex-col gap-2\">\n <DialogTitle className=\"paragraph-medium-semibold text-zinc-950\">\n {translate('common.account.workspace.projects.disabledModal.title')}\n </DialogTitle>\n <DialogDescription className=\"paragraph-small-regular text-zinc-600\" asChild>\n <div className=\"flex flex-col gap-3\">\n <p>{translate('common.account.workspace.projects.disabledModal.description1')}</p>\n <p>{translate('common.account.workspace.projects.disabledModal.description2')}</p>\n </div>\n </DialogDescription>\n </div>\n </DialogHeader>\n\n <Separator />\n\n <div className=\"flex items-center gap-2 p-5\">\n {isOwnerOrAdmin && (\n <Button className=\"h-10! transition-colors\" onClick={handleUpgrade}>\n {translate('common.account.workspace.projects.disabledModal.upgrade')}\n </Button>\n )}\n <Button variant=\"secondary\" className=\"h-10! transition-colors\" onClick={closeProjectsDisabled}>\n {translate('common.actions.cancel')}\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";AAsCY,cAOE,YAPF;AApCZ,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAChC,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gCAAgC;AACzC,SAAS,uBAAuB;AAChC,OAAO,4BAA4B;AAG5B,SAAS,wBAAwB;AACtC,QAAM,YAAY,gBAAgB;AAClC,QAAM,EAAE,eAAe,IAAI,yBAAyB;AACpD,QAAM,SAAS,gBAAgB,CAAC,UAAU,MAAM,sBAAsB;AACtE,QAAM,wBAAwB,gBAAgB,CAAC,UAAU,MAAM,qBAAqB;AACpF,QAAM,sBAAsB,uBAAuB;AAEnD,QAAM,gBAAgB,MAAM;AAC1B,0BAAsB;AACtB,wBAAoB,WAAW;AAAA,EACjC;AAEA,SACE,oBAAC,UAAO,MAAM,QAAQ,cAAc,CAAC,aAAa,CAAC,YAAY,sBAAsB,GACnF;AAAA,IAAC;AAAA;AAAA,MACC,iBAAiB,CAAC,UAAU,MAAM,eAAe;AAAA,MACjD,WAAU;AAAA,MAEV;AAAA,6BAAC,gBAAa,WAAU,uBACtB;AAAA,8BAAC,SAAI,WAAU,qEACb,8BAAC,qBAAkB,MAAM,IAAI,WAAU,iBAAgB,GACzD;AAAA,UACA,qBAAC,SAAI,WAAU,uBACb;AAAA,gCAAC,eAAY,WAAU,2CACpB,oBAAU,uDAAuD,GACpE;AAAA,YACA,oBAAC,qBAAkB,WAAU,yCAAwC,SAAO,MAC1E,+BAAC,SAAI,WAAU,uBACb;AAAA,kCAAC,OAAG,oBAAU,8DAA8D,GAAE;AAAA,cAC9E,oBAAC,OAAG,oBAAU,8DAA8D,GAAE;AAAA,eAChF,GACF;AAAA,aACF;AAAA,WACF;AAAA,QAEA,oBAAC,aAAU;AAAA,QAEX,qBAAC,SAAI,WAAU,+BACZ;AAAA,4BACC,oBAAC,UAAO,WAAU,2BAA0B,SAAS,eAClD,oBAAU,yDAAyD,GACtE;AAAA,UAEF,oBAAC,UAAO,SAAQ,aAAY,WAAU,2BAA0B,SAAS,uBACtE,oBAAU,uBAAuB,GACpC;AAAA,WACF;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { UserProfile } from "../../../../modules/users/schema";
|
|
3
|
+
const projectUsersSchema = z.array(
|
|
4
|
+
z.object({
|
|
5
|
+
id: z.number(),
|
|
6
|
+
name: z.string(),
|
|
7
|
+
email: z.string(),
|
|
8
|
+
profile: z.enum([
|
|
9
|
+
UserProfile.owner,
|
|
10
|
+
UserProfile.admin,
|
|
11
|
+
UserProfile.collaborator,
|
|
12
|
+
UserProfile.viewer
|
|
13
|
+
]),
|
|
14
|
+
initials: z.string().optional(),
|
|
15
|
+
photo: z.string().nullable().optional()
|
|
16
|
+
})
|
|
17
|
+
);
|
|
18
|
+
function buildProjectFormSchema(nameRequired) {
|
|
19
|
+
return z.object({
|
|
20
|
+
name: z.string().min(1, nameRequired),
|
|
21
|
+
logo: z.string().nullable().optional(),
|
|
22
|
+
users: projectUsersSchema
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
buildProjectFormSchema
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=project-form.schema.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/projects/project-form.schema.ts"],"sourcesContent":["import { z } from 'zod';\nimport { UserProfile } from '../../../../modules/users/schema';\n\nconst projectUsersSchema = z.array(\n z.object({\n id: z.number(),\n name: z.string(),\n email: z.string(),\n profile: z.enum([\n UserProfile.owner,\n UserProfile.admin,\n UserProfile.collaborator,\n UserProfile.viewer,\n ]),\n initials: z.string().optional(),\n photo: z.string().nullable().optional(),\n })\n);\n\n/** `nameRequired` já vem traduzido — o schema é montado dentro do componente com `useMemo`. */\nexport function buildProjectFormSchema(nameRequired: string) {\n return z.object({\n name: z.string().min(1, nameRequired),\n logo: z.string().nullable().optional(),\n users: projectUsersSchema,\n });\n}\n\nexport type ProjectFormData = z.infer<ReturnType<typeof buildProjectFormSchema>>;\nexport type ProjectFormUser = ProjectFormData['users'][number];\n"],"mappings":"AAAA,SAAS,SAAS;AAClB,SAAS,mBAAmB;AAE5B,MAAM,qBAAqB,EAAE;AAAA,EAC3B,EAAE,OAAO;AAAA,IACP,IAAI,EAAE,OAAO;AAAA,IACb,MAAM,EAAE,OAAO;AAAA,IACf,OAAO,EAAE,OAAO;AAAA,IAChB,SAAS,EAAE,KAAK;AAAA,MACd,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,IACd,CAAC;AAAA,IACD,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,IAC9B,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EACxC,CAAC;AACH;AAGO,SAAS,uBAAuB,cAAsB;AAC3D,SAAO,EAAE,OAAO;AAAA,IACd,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,YAAY;AAAA,IACpC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,IACrC,OAAO;AAAA,EACT,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { IconPlus } from "@tabler/icons-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Badge } from "../../../ui/data-display/Badge";
|
|
6
|
+
import { Button } from "../../../ui/buttons/Button";
|
|
7
|
+
import { cn } from "../../../../infra/utils/clsx";
|
|
8
|
+
import { EntityAvatar } from "./EntityAvatar";
|
|
9
|
+
function ConnectListRow({
|
|
10
|
+
name,
|
|
11
|
+
photo,
|
|
12
|
+
badge,
|
|
13
|
+
hideBorder = false,
|
|
14
|
+
variant = "default",
|
|
15
|
+
onAction,
|
|
16
|
+
showAction = true
|
|
17
|
+
}) {
|
|
18
|
+
const translate = useTranslations();
|
|
19
|
+
const isSelected = variant === "selected";
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: cn(
|
|
24
|
+
"px-4 py-4 flex items-center justify-between w-full gap-4",
|
|
25
|
+
isSelected && "bg-zinc-50",
|
|
26
|
+
!hideBorder && "border-b border-zinc-200"
|
|
27
|
+
),
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx(EntityAvatar, { name, photo }),
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
31
|
+
/* @__PURE__ */ jsx("span", { className: "text-zinc-950 paragraph-small-semibold truncate", children: name }),
|
|
32
|
+
badge && /* @__PURE__ */ jsx(Badge, { className: "text-zinc-600 paragraph-xsmall-semibold rounded-lg border border-zinc-200 bg-white", children: badge })
|
|
33
|
+
] }),
|
|
34
|
+
showAction && (isSelected ? /* @__PURE__ */ jsx(Button, { variant: "ghost", className: "h-10! text-zinc-600", type: "button", onClick: onAction, children: translate("common.actions.remove") }) : /* @__PURE__ */ jsxs(Button, { variant: "secondary", className: "h-10! shrink-0", type: "button", onClick: onAction, children: [
|
|
35
|
+
/* @__PURE__ */ jsx(IconPlus, { size: 20 }),
|
|
36
|
+
translate("common.actions.connect")
|
|
37
|
+
] }))
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
ConnectListRow
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=ConnectListRow.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/ConnectListRow.tsx"],"sourcesContent":["'use client';\n\nimport { IconPlus } from '@tabler/icons-react';\nimport { useTranslations } from 'next-intl';\nimport { Badge } from '../../../ui/data-display/Badge';\nimport { Button } from '../../../ui/buttons/Button';\nimport { cn } from '../../../../infra/utils/clsx';\nimport { EntityAvatar } from './EntityAvatar';\n\ntype ConnectListRowProps = {\n name: string;\n photo?: string | null;\n /** Etiqueta à direita do nome (o perfil, nas listas de usuário). */\n badge?: string;\n hideBorder?: boolean;\n /** `selected` é o que já está vinculado: fundo cinza e ação de remover. */\n variant?: 'default' | 'selected';\n onAction?: () => void;\n showAction?: boolean;\n};\n\n/**\n * Linha de vínculo dos sheets da conta: usuários no sheet de projeto e projetos no sheet de usuário.\n * Mesmo formato das listas de conectar/remover das telas de projetos e equipe.\n */\nexport function ConnectListRow({\n name,\n photo,\n badge,\n hideBorder = false,\n variant = 'default',\n onAction,\n showAction = true,\n}: ConnectListRowProps) {\n const translate = useTranslations();\n const isSelected = variant === 'selected';\n\n return (\n <div\n className={cn(\n 'px-4 py-4 flex items-center justify-between w-full gap-4',\n isSelected && 'bg-zinc-50',\n !hideBorder && 'border-b border-zinc-200'\n )}\n >\n <EntityAvatar name={name} photo={photo} />\n <div className=\"flex items-center gap-2 flex-1 min-w-0\">\n <span className=\"text-zinc-950 paragraph-small-semibold truncate\">{name}</span>\n {badge && (\n <Badge className=\"text-zinc-600 paragraph-xsmall-semibold rounded-lg border border-zinc-200 bg-white\">\n {badge}\n </Badge>\n )}\n </div>\n {showAction &&\n (isSelected ? (\n <Button variant=\"ghost\" className=\"h-10! text-zinc-600\" type=\"button\" onClick={onAction}>\n {translate('common.actions.remove')}\n </Button>\n ) : (\n <Button variant=\"secondary\" className=\"h-10! shrink-0\" type=\"button\" onClick={onAction}>\n <IconPlus size={20} />\n {translate('common.actions.connect')}\n </Button>\n ))}\n </div>\n );\n}\n"],"mappings":";AA6CM,cACA,YADA;AA3CN,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAS,aAAa;AACtB,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAkBtB,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,UAAU;AAAA,EACV;AAAA,EACA,aAAa;AACf,GAAwB;AACtB,QAAM,YAAY,gBAAgB;AAClC,QAAM,aAAa,YAAY;AAE/B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,cAAc;AAAA,QACd,CAAC,cAAc;AAAA,MACjB;AAAA,MAEA;AAAA,4BAAC,gBAAa,MAAY,OAAc;AAAA,QACxC,qBAAC,SAAI,WAAU,0CACb;AAAA,8BAAC,UAAK,WAAU,mDAAmD,gBAAK;AAAA,UACvE,SACC,oBAAC,SAAM,WAAU,sFACd,iBACH;AAAA,WAEJ;AAAA,QACC,eACE,aACC,oBAAC,UAAO,SAAQ,SAAQ,WAAU,uBAAsB,MAAK,UAAS,SAAS,UAC5E,oBAAU,uBAAuB,GACpC,IAEA,qBAAC,UAAO,SAAQ,aAAY,WAAU,kBAAiB,MAAK,UAAS,SAAS,UAC5E;AAAA,8BAAC,YAAS,MAAM,IAAI;AAAA,UACnB,UAAU,wBAAwB;AAAA,WACrC;AAAA;AAAA;AAAA,EAEN;AAEJ;","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { IconChevronDown } from "@tabler/icons-react";
|
|
5
|
+
import { useTranslations } from "next-intl";
|
|
6
|
+
import { Button } from "../../../ui/buttons/Button";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../../ui/overlay/Popover";
|
|
8
|
+
import { NavBarItem } from "../../../layouts/NavBarItem";
|
|
9
|
+
import { cn } from "../../../../infra/utils/clsx";
|
|
10
|
+
import { DATE_FILTER_PERIODS, DateFilterPeriod } from "../../../../enums/DateFilterPeriod";
|
|
11
|
+
const PERIOD_KEYS = {
|
|
12
|
+
[DateFilterPeriod.TODAY]: "today",
|
|
13
|
+
[DateFilterPeriod.YESTERDAY]: "yesterday",
|
|
14
|
+
[DateFilterPeriod.LAST_7_DAYS]: "last7Days",
|
|
15
|
+
[DateFilterPeriod.LAST_30_DAYS]: "last30Days",
|
|
16
|
+
[DateFilterPeriod.LAST_MONTH]: "lastMonth",
|
|
17
|
+
[DateFilterPeriod.ALL_TIME]: "allTime"
|
|
18
|
+
};
|
|
19
|
+
function DateFilterPopover({ selectedPeriod, onSelectPeriod }) {
|
|
20
|
+
const translatePeriod = useTranslations("common.account.workspace.dateFilter");
|
|
21
|
+
const [open, setOpen] = useState(false);
|
|
22
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
23
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", className: "paragraph-small-regular text-zinc-600 gap-2 h-10!", children: [
|
|
24
|
+
translatePeriod(PERIOD_KEYS[selectedPeriod]),
|
|
25
|
+
/* @__PURE__ */ jsx(IconChevronDown, { size: 16, className: cn("transition-transform duration-200", open && "rotate-180") })
|
|
26
|
+
] }) }),
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
PopoverContent,
|
|
29
|
+
{
|
|
30
|
+
align: "end",
|
|
31
|
+
sideOffset: 8,
|
|
32
|
+
className: "w-[200px] p-0 bg-white rounded-2xl shadow-md border border-zinc-200",
|
|
33
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col p-1.5 rounded-2xl", children: DATE_FILTER_PERIODS.map((period) => /* @__PURE__ */ jsx(
|
|
34
|
+
NavBarItem,
|
|
35
|
+
{
|
|
36
|
+
label: translatePeriod(PERIOD_KEYS[period]),
|
|
37
|
+
onClick: () => {
|
|
38
|
+
onSelectPeriod(period);
|
|
39
|
+
setOpen(false);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
period
|
|
43
|
+
)) })
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
DateFilterPopover
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=DateFilterPopover.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/DateFilterPopover.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { IconChevronDown } from '@tabler/icons-react';\nimport { useTranslations } from 'next-intl';\nimport { Button } from '../../../ui/buttons/Button';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../../ui/overlay/Popover';\nimport { NavBarItem } from '../../../layouts/NavBarItem';\nimport { cn } from '../../../../infra/utils/clsx';\nimport { DATE_FILTER_PERIODS, DateFilterPeriod } from '../../../../enums/DateFilterPeriod';\n\nconst PERIOD_KEYS = {\n [DateFilterPeriod.TODAY]: 'today',\n [DateFilterPeriod.YESTERDAY]: 'yesterday',\n [DateFilterPeriod.LAST_7_DAYS]: 'last7Days',\n [DateFilterPeriod.LAST_30_DAYS]: 'last30Days',\n [DateFilterPeriod.LAST_MONTH]: 'lastMonth',\n [DateFilterPeriod.ALL_TIME]: 'allTime',\n} as const satisfies Record<DateFilterPeriod, string>;\n\ntype DateFilterPopoverProps = {\n selectedPeriod: DateFilterPeriod;\n onSelectPeriod: (period: DateFilterPeriod) => void;\n};\n\nexport function DateFilterPopover({ selectedPeriod, onSelectPeriod }: DateFilterPopoverProps) {\n const translatePeriod = useTranslations('common.account.workspace.dateFilter');\n const [open, setOpen] = useState(false);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button variant=\"ghost\" className=\"paragraph-small-regular text-zinc-600 gap-2 h-10!\">\n {translatePeriod(PERIOD_KEYS[selectedPeriod])}\n <IconChevronDown size={16} className={cn('transition-transform duration-200', open && 'rotate-180')} />\n </Button>\n </PopoverTrigger>\n <PopoverContent\n align=\"end\"\n sideOffset={8}\n className=\"w-[200px] p-0 bg-white rounded-2xl shadow-md border border-zinc-200\"\n >\n <div className=\"flex flex-col p-1.5 rounded-2xl\">\n {DATE_FILTER_PERIODS.map((period) => (\n <NavBarItem\n key={period}\n label={translatePeriod(PERIOD_KEYS[period])}\n onClick={() => {\n onSelectPeriod(period);\n setOpen(false);\n }}\n />\n ))}\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";AAgCQ,SAEE,KAFF;AA9BR,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,cAAc;AACvB,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AACnB,SAAS,qBAAqB,wBAAwB;AAEtD,MAAM,cAAc;AAAA,EAClB,CAAC,iBAAiB,KAAK,GAAG;AAAA,EAC1B,CAAC,iBAAiB,SAAS,GAAG;AAAA,EAC9B,CAAC,iBAAiB,WAAW,GAAG;AAAA,EAChC,CAAC,iBAAiB,YAAY,GAAG;AAAA,EACjC,CAAC,iBAAiB,UAAU,GAAG;AAAA,EAC/B,CAAC,iBAAiB,QAAQ,GAAG;AAC/B;AAOO,SAAS,kBAAkB,EAAE,gBAAgB,eAAe,GAA2B;AAC5F,QAAM,kBAAkB,gBAAgB,qCAAqC;AAC7E,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AAEtC,SACE,qBAAC,WAAQ,MAAY,cAAc,SACjC;AAAA,wBAAC,kBAAe,SAAO,MACrB,+BAAC,UAAO,SAAQ,SAAQ,WAAU,qDAC/B;AAAA,sBAAgB,YAAY,cAAc,CAAC;AAAA,MAC5C,oBAAC,mBAAgB,MAAM,IAAI,WAAW,GAAG,qCAAqC,QAAQ,YAAY,GAAG;AAAA,OACvG,GACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,OAAM;AAAA,QACN,YAAY;AAAA,QACZ,WAAU;AAAA,QAEV,8BAAC,SAAI,WAAU,mCACZ,8BAAoB,IAAI,CAAC,WACxB;AAAA,UAAC;AAAA;AAAA,YAEC,OAAO,gBAAgB,YAAY,MAAM,CAAC;AAAA,YAC1C,SAAS,MAAM;AACb,6BAAe,MAAM;AACrB,sBAAQ,KAAK;AAAA,YACf;AAAA;AAAA,UALK;AAAA,QAMP,CACD,GACH;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { cn } from "../../../../infra/utils/clsx";
|
|
5
|
+
import { useIsDefaultWhitelabel } from "../../../../providers/whitelabel.provider";
|
|
6
|
+
import { getInitials } from "../../../../utils/format/initials";
|
|
7
|
+
const STORAGE_URL = process.env.NEXT_PUBLIC_STORAGE_URL || "";
|
|
8
|
+
function EntityAvatar({ name, photo, initials, tone = "neutral", className }) {
|
|
9
|
+
const isDefaultWhitelabel = useIsDefaultWhitelabel();
|
|
10
|
+
const [failedSrc, setFailedSrc] = useState(null);
|
|
11
|
+
const src = photo ? STORAGE_URL && !photo.startsWith("http") ? `${STORAGE_URL}/${photo}` : photo : null;
|
|
12
|
+
if (src && failedSrc !== src) {
|
|
13
|
+
return (
|
|
14
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
15
|
+
/* @__PURE__ */ jsx(
|
|
16
|
+
"img",
|
|
17
|
+
{
|
|
18
|
+
src,
|
|
19
|
+
alt: name ?? "",
|
|
20
|
+
className: cn("size-8 rounded-full object-cover shrink-0 bg-gray-100", className),
|
|
21
|
+
onError: () => setFailedSrc(src)
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: cn(
|
|
30
|
+
"size-8 rounded-full flex items-center justify-center shrink-0",
|
|
31
|
+
tone === "brand" ? isDefaultWhitelabel ? "bg-cyan-50 text-cyan-700" : "bg-zinc-50 text-zinc-700" : "bg-gray-100 text-gray-700",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
children: /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold", children: initials || getInitials(name) || "?" })
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
EntityAvatar
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=EntityAvatar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/EntityAvatar.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { cn } from '../../../../infra/utils/clsx';\nimport { useIsDefaultWhitelabel } from '../../../../providers/whitelabel.provider';\nimport { getInitials } from '../../../../utils/format/initials';\n\nconst STORAGE_URL = process.env.NEXT_PUBLIC_STORAGE_URL || '';\n\ntype EntityAvatarProps = {\n name?: string | null;\n photo?: string | null;\n /** Iniciais vindas da API; sem elas, derivadas do nome. */\n initials?: string | null;\n /** `neutral` segue o UserAvatar (listas de projetos e equipe); `brand` usa a cor do whitelabel (pilha de membros). */\n tone?: 'neutral' | 'brand';\n className?: string;\n};\n\n/** Avatar redondo de 32px com foto ou iniciais. Foto que não carrega cai nas iniciais em vez da imagem quebrada. */\nexport function EntityAvatar({ name, photo, initials, tone = 'neutral', className }: EntityAvatarProps) {\n const isDefaultWhitelabel = useIsDefaultWhitelabel();\n const [failedSrc, setFailedSrc] = useState<string | null>(null);\n\n const src = photo ? (STORAGE_URL && !photo.startsWith('http') ? `${STORAGE_URL}/${photo}` : photo) : null;\n\n if (src && failedSrc !== src) {\n return (\n // eslint-disable-next-line @next/next/no-img-element\n <img\n src={src}\n alt={name ?? ''}\n className={cn('size-8 rounded-full object-cover shrink-0 bg-gray-100', className)}\n onError={() => setFailedSrc(src)}\n />\n );\n }\n\n return (\n <div\n className={cn(\n 'size-8 rounded-full flex items-center justify-center shrink-0',\n tone === 'brand'\n ? isDefaultWhitelabel\n ? 'bg-cyan-50 text-cyan-700'\n : 'bg-zinc-50 text-zinc-700'\n : 'bg-gray-100 text-gray-700',\n className\n )}\n >\n <span className=\"text-xs font-semibold\">{initials || getInitials(name) || '?'}</span>\n </div>\n );\n}\n"],"mappings":";AA6BM;AA3BN,SAAS,gBAAgB;AACzB,SAAS,UAAU;AACnB,SAAS,8BAA8B;AACvC,SAAS,mBAAmB;AAE5B,MAAM,cAAc,QAAQ,IAAI,2BAA2B;AAapD,SAAS,aAAa,EAAE,MAAM,OAAO,UAAU,OAAO,WAAW,UAAU,GAAsB;AACtG,QAAM,sBAAsB,uBAAuB;AACnD,QAAM,CAAC,WAAW,YAAY,IAAI,SAAwB,IAAI;AAE9D,QAAM,MAAM,QAAS,eAAe,CAAC,MAAM,WAAW,MAAM,IAAI,GAAG,WAAW,IAAI,KAAK,KAAK,QAAS;AAErG,MAAI,OAAO,cAAc,KAAK;AAC5B;AAAA;AAAA,MAEE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,KAAK,QAAQ;AAAA,UACb,WAAW,GAAG,yDAAyD,SAAS;AAAA,UAChF,SAAS,MAAM,aAAa,GAAG;AAAA;AAAA,MACjC;AAAA;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,SAAS,UACL,sBACE,6BACA,6BACF;AAAA,QACJ;AAAA,MACF;AAAA,MAEA,8BAAC,UAAK,WAAU,yBAAyB,sBAAY,YAAY,IAAI,KAAK,KAAI;AAAA;AAAA,EAChF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from "react";
|
|
4
|
+
import { IconFilter } from "@tabler/icons-react";
|
|
5
|
+
import { Button } from "../../../ui/buttons/Button";
|
|
6
|
+
import { Checkbox } from "../../../ui/form/Checkbox";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../../ui/overlay/Popover";
|
|
8
|
+
import { cn } from "../../../../infra/utils/clsx";
|
|
9
|
+
function FilterPopover({
|
|
10
|
+
label,
|
|
11
|
+
options,
|
|
12
|
+
selected,
|
|
13
|
+
onToggle,
|
|
14
|
+
width = 220
|
|
15
|
+
}) {
|
|
16
|
+
const baseId = useId();
|
|
17
|
+
return /* @__PURE__ */ jsxs(Popover, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", className: "h-10! gap-2 shrink-0", "aria-label": label, children: [
|
|
19
|
+
/* @__PURE__ */ jsx(IconFilter, { size: 20, className: "text-zinc-500" }),
|
|
20
|
+
/* @__PURE__ */ jsx("span", { className: "hidden lg:block", children: label }),
|
|
21
|
+
selected.length > 0 && /* @__PURE__ */ jsx("span", { className: "flex justify-center items-center size-5 rounded-full border border-zinc-200 bg-white paragraph-xsmall-semibold text-zinc-950", children: selected.length })
|
|
22
|
+
] }) }),
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
PopoverContent,
|
|
25
|
+
{
|
|
26
|
+
className: "py-2 px-4 bg-white rounded-2xl shadow-none border border-zinc-200",
|
|
27
|
+
style: { width },
|
|
28
|
+
sideOffset: 8,
|
|
29
|
+
align: "end",
|
|
30
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: options.map((option) => {
|
|
31
|
+
const id = `${baseId}-filter-${option.value}`;
|
|
32
|
+
return /* @__PURE__ */ jsxs(
|
|
33
|
+
"label",
|
|
34
|
+
{
|
|
35
|
+
htmlFor: id,
|
|
36
|
+
className: "flex justify-between py-2.5 cursor-pointer hover:bg-zinc-50 transition-colors rounded-lg px-2 -mx-2",
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 paragraph-small-medium text-zinc-950", children: [
|
|
39
|
+
option.color && /* @__PURE__ */ jsx("span", { className: cn("size-2 rounded-full shrink-0", option.color) }),
|
|
40
|
+
option.label
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
Checkbox,
|
|
44
|
+
{
|
|
45
|
+
id,
|
|
46
|
+
checked: selected.includes(option.value),
|
|
47
|
+
onCheckedChange: (checked) => onToggle(option.value, checked === true)
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
option.value
|
|
53
|
+
);
|
|
54
|
+
}) })
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
FilterPopover
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=FilterPopover.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/FilterPopover.tsx"],"sourcesContent":["'use client';\n\nimport { useId } from 'react';\nimport { IconFilter } from '@tabler/icons-react';\nimport { Button } from '../../../ui/buttons/Button';\nimport { Checkbox } from '../../../ui/form/Checkbox';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../../ui/overlay/Popover';\nimport { cn } from '../../../../infra/utils/clsx';\n\nexport type FilterOption<T extends string | number> = {\n value: T;\n label: string;\n /** Ponto colorido à esquerda do rótulo (ex.: `bg-green-500`), usado nos filtros de status. */\n color?: string;\n};\n\ntype FilterPopoverProps<T extends string | number> = {\n label: string;\n options: FilterOption<T>[];\n selected: T[];\n onToggle: (value: T, checked: boolean) => void;\n width?: number;\n};\n\nexport function FilterPopover<T extends string | number>({\n label,\n options,\n selected,\n onToggle,\n width = 220,\n}: FilterPopoverProps<T>) {\n const baseId = useId();\n\n return (\n <Popover>\n <PopoverTrigger asChild>\n <Button variant=\"ghost\" className=\"h-10! gap-2 shrink-0\" aria-label={label}>\n <IconFilter size={20} className=\"text-zinc-500\" />\n <span className=\"hidden lg:block\">{label}</span>\n {selected.length > 0 && (\n <span className=\"flex justify-center items-center size-5 rounded-full border border-zinc-200 bg-white paragraph-xsmall-semibold text-zinc-950\">\n {selected.length}\n </span>\n )}\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"py-2 px-4 bg-white rounded-2xl shadow-none border border-zinc-200\"\n style={{ width }}\n sideOffset={8}\n align=\"end\"\n >\n <div className=\"flex flex-col\">\n {options.map((option) => {\n const id = `${baseId}-filter-${option.value}`;\n\n return (\n <label\n key={option.value}\n htmlFor={id}\n className=\"flex justify-between py-2.5 cursor-pointer hover:bg-zinc-50 transition-colors rounded-lg px-2 -mx-2\"\n >\n <span className=\"flex items-center gap-2 paragraph-small-medium text-zinc-950\">\n {option.color && <span className={cn('size-2 rounded-full shrink-0', option.color)} />}\n {option.label}\n </span>\n <Checkbox\n id={id}\n checked={selected.includes(option.value)}\n onCheckedChange={(checked) => onToggle(option.value, checked === true)}\n />\n </label>\n );\n })}\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";AAoCQ,SACE,KADF;AAlCR,SAAS,aAAa;AACtB,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,UAAU;AAiBZ,SAAS,cAAyC;AAAA,EACvD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,GAA0B;AACxB,QAAM,SAAS,MAAM;AAErB,SACE,qBAAC,WACC;AAAA,wBAAC,kBAAe,SAAO,MACrB,+BAAC,UAAO,SAAQ,SAAQ,WAAU,wBAAuB,cAAY,OACnE;AAAA,0BAAC,cAAW,MAAM,IAAI,WAAU,iBAAgB;AAAA,MAChD,oBAAC,UAAK,WAAU,mBAAmB,iBAAM;AAAA,MACxC,SAAS,SAAS,KACjB,oBAAC,UAAK,WAAU,gIACb,mBAAS,QACZ;AAAA,OAEJ,GACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,MAAM;AAAA,QACf,YAAY;AAAA,QACZ,OAAM;AAAA,QAEN,8BAAC,SAAI,WAAU,iBACZ,kBAAQ,IAAI,CAAC,WAAW;AACvB,gBAAM,KAAK,GAAG,MAAM,WAAW,OAAO,KAAK;AAE3C,iBACE;AAAA,YAAC;AAAA;AAAA,cAEC,SAAS;AAAA,cACT,WAAU;AAAA,cAEV;AAAA,qCAAC,UAAK,WAAU,gEACb;AAAA,yBAAO,SAAS,oBAAC,UAAK,WAAW,GAAG,gCAAgC,OAAO,KAAK,GAAG;AAAA,kBACnF,OAAO;AAAA,mBACV;AAAA,gBACA;AAAA,kBAAC;AAAA;AAAA,oBACC;AAAA,oBACA,SAAS,SAAS,SAAS,OAAO,KAAK;AAAA,oBACvC,iBAAiB,CAAC,YAAY,SAAS,OAAO,OAAO,YAAY,IAAI;AAAA;AAAA,gBACvE;AAAA;AAAA;AAAA,YAZK,OAAO;AAAA,UAad;AAAA,QAEJ,CAAC,GACH;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
function FormSection({ title, description, children }) {
|
|
3
|
+
return /* @__PURE__ */ jsxs("section", { className: "grid gap-4 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-12", children: [
|
|
4
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
5
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-gray-950", children: title }),
|
|
6
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-small-regular text-gray-500", children: description })
|
|
7
|
+
] }),
|
|
8
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-6 min-w-0", children })
|
|
9
|
+
] });
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
FormSection
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=FormSection.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/FormSection.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\ntype FormSectionProps = {\n title: string;\n description: string;\n children: ReactNode;\n};\n\n/**\n * Seção de formulário do modal Minha conta: título e descrição à esquerda, conteúdo à direita.\n * No mobile as duas colunas empilham.\n */\nexport function FormSection({ title, description, children }: FormSectionProps) {\n return (\n <section className=\"grid gap-4 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-12\">\n <div className=\"flex flex-col gap-1\">\n <span className=\"paragraph-medium-semibold text-gray-950\">{title}</span>\n <span className=\"paragraph-small-regular text-gray-500\">{description}</span>\n </div>\n <div className=\"flex flex-col gap-6 min-w-0\">{children}</div>\n </section>\n );\n}\n"],"mappings":"AAeM,SACE,KADF;AAHC,SAAS,YAAY,EAAE,OAAO,aAAa,SAAS,GAAqB;AAC9E,SACE,qBAAC,aAAQ,WAAU,2DACjB;AAAA,yBAAC,SAAI,WAAU,uBACb;AAAA,0BAAC,UAAK,WAAU,2CAA2C,iBAAM;AAAA,MACjE,oBAAC,UAAK,WAAU,yCAAyC,uBAAY;AAAA,OACvE;AAAA,IACA,oBAAC,SAAI,WAAU,+BAA+B,UAAS;AAAA,KACzD;AAEJ;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../infra/utils/clsx";
|
|
3
|
+
function IconBox({ icon: Icon, className, iconClassName }) {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
className: cn(
|
|
8
|
+
"flex items-center justify-center size-10 bg-white rounded-lg shrink-0 shadow-sm",
|
|
9
|
+
className
|
|
10
|
+
),
|
|
11
|
+
children: /* @__PURE__ */ jsx(Icon, { size: 20, className: cn("text-zinc-950", iconClassName), strokeWidth: 2 })
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
IconBox
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=IconBox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/IconBox.tsx"],"sourcesContent":["import type { TablerIcon } from '@tabler/icons-react';\nimport { cn } from '../../../../infra/utils/clsx';\n\ntype IconBoxProps = {\n icon: TablerIcon;\n className?: string;\n iconClassName?: string;\n};\n\nexport function IconBox({ icon: Icon, className, iconClassName }: IconBoxProps) {\n return (\n <div\n className={cn(\n 'flex items-center justify-center size-10 bg-white rounded-lg shrink-0 shadow-sm',\n className\n )}\n >\n <Icon size={20} className={cn('text-zinc-950', iconClassName)} strokeWidth={2} />\n </div>\n );\n}\n"],"mappings":"AAiBM;AAhBN,SAAS,UAAU;AAQZ,SAAS,QAAQ,EAAE,MAAM,MAAM,WAAW,cAAc,GAAiB;AAC9E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEA,8BAAC,QAAK,MAAM,IAAI,WAAW,GAAG,iBAAiB,aAAa,GAAG,aAAa,GAAG;AAAA;AAAA,EACjF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
function InfiniteScrollList({
|
|
5
|
+
hasMore,
|
|
6
|
+
isLoadingMore,
|
|
7
|
+
onLoadMore,
|
|
8
|
+
threshold = 40,
|
|
9
|
+
onScroll,
|
|
10
|
+
children,
|
|
11
|
+
...rest
|
|
12
|
+
}) {
|
|
13
|
+
const sentinelRef = useRef(null);
|
|
14
|
+
const loadMoreRef = useRef(onLoadMore);
|
|
15
|
+
loadMoreRef.current = onLoadMore;
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const sentinel = sentinelRef.current;
|
|
18
|
+
if (!sentinel || !hasMore || isLoadingMore) return;
|
|
19
|
+
const observer = new IntersectionObserver(
|
|
20
|
+
(entries) => {
|
|
21
|
+
if (entries.some((entry) => entry.isIntersecting)) loadMoreRef.current();
|
|
22
|
+
},
|
|
23
|
+
{ rootMargin: `0px 0px ${threshold}px 0px` }
|
|
24
|
+
);
|
|
25
|
+
observer.observe(sentinel);
|
|
26
|
+
return () => observer.disconnect();
|
|
27
|
+
}, [hasMore, isLoadingMore, threshold]);
|
|
28
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, onScroll, children: [
|
|
29
|
+
children,
|
|
30
|
+
/* @__PURE__ */ jsx("div", { ref: sentinelRef, "aria-hidden": true, className: "h-px w-full shrink-0" })
|
|
31
|
+
] });
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
InfiniteScrollList
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=InfiniteScrollList.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/InfiniteScrollList.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, type HTMLAttributes, type UIEvent } from 'react';\n\ntype InfiniteScrollListProps = Omit<HTMLAttributes<HTMLDivElement>, 'onScroll'> & {\n hasMore: boolean;\n isLoadingMore: boolean;\n onLoadMore: () => void;\n /** Distância do fim, em px, que dispara a próxima página. */\n threshold?: number;\n onScroll?: (event: UIEvent<HTMLDivElement>) => void;\n};\n\n/**\n * Lista que pede a próxima página quando o fim entra em cena.\n *\n * A checagem é por sentinela, e não pelo `scrollTop` da própria lista: assim ela funciona tanto\n * com rolagem própria quanto quando quem rola é a coluna em volta — o que evita ter de encaixar\n * uma ilha de rolagem dentro de outra só para a paginação continuar viva.\n */\nexport function InfiniteScrollList({\n hasMore,\n isLoadingMore,\n onLoadMore,\n threshold = 40,\n onScroll,\n children,\n ...rest\n}: InfiniteScrollListProps) {\n const sentinelRef = useRef<HTMLDivElement>(null);\n // Ref para o observer não ser recriado a cada render só porque o callback mudou de identidade.\n const loadMoreRef = useRef(onLoadMore);\n loadMoreRef.current = onLoadMore;\n\n useEffect(() => {\n const sentinel = sentinelRef.current;\n if (!sentinel || !hasMore || isLoadingMore) return;\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries.some((entry) => entry.isIntersecting)) loadMoreRef.current();\n },\n { rootMargin: `0px 0px ${threshold}px 0px` }\n );\n\n observer.observe(sentinel);\n\n return () => observer.disconnect();\n }, [hasMore, isLoadingMore, threshold]);\n\n return (\n <div {...rest} onScroll={onScroll}>\n {children}\n <div ref={sentinelRef} aria-hidden className=\"h-px w-full shrink-0\" />\n </div>\n );\n}\n"],"mappings":";AAmDI,SAEE,KAFF;AAjDJ,SAAS,WAAW,cAAiD;AAkB9D,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA4B;AAC1B,QAAM,cAAc,OAAuB,IAAI;AAE/C,QAAM,cAAc,OAAO,UAAU;AACrC,cAAY,UAAU;AAEtB,YAAU,MAAM;AACd,UAAM,WAAW,YAAY;AAC7B,QAAI,CAAC,YAAY,CAAC,WAAW,cAAe;AAE5C,UAAM,WAAW,IAAI;AAAA,MACnB,CAAC,YAAY;AACX,YAAI,QAAQ,KAAK,CAAC,UAAU,MAAM,cAAc,EAAG,aAAY,QAAQ;AAAA,MACzE;AAAA,MACA,EAAE,YAAY,WAAW,SAAS,SAAS;AAAA,IAC7C;AAEA,aAAS,QAAQ,QAAQ;AAEzB,WAAO,MAAM,SAAS,WAAW;AAAA,EACnC,GAAG,CAAC,SAAS,eAAe,SAAS,CAAC;AAEtC,SACE,qBAAC,SAAK,GAAG,MAAM,UACZ;AAAA;AAAA,IACD,oBAAC,SAAI,KAAK,aAAa,eAAW,MAAC,WAAU,wBAAuB;AAAA,KACtE;AAEJ;","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { cn } from "../../../../infra/utils/clsx";
|
|
6
|
+
function buildPages(currentPage, totalPages) {
|
|
7
|
+
const pages = [1];
|
|
8
|
+
if (currentPage > 3) pages.push("ellipsis");
|
|
9
|
+
for (let page = Math.max(2, currentPage - 1); page <= Math.min(totalPages - 1, currentPage + 1); page++) {
|
|
10
|
+
if (!pages.includes(page)) pages.push(page);
|
|
11
|
+
}
|
|
12
|
+
if (currentPage < totalPages - 2) pages.push("ellipsis");
|
|
13
|
+
if (totalPages > 1 && !pages.includes(totalPages)) pages.push(totalPages);
|
|
14
|
+
return pages;
|
|
15
|
+
}
|
|
16
|
+
function ListPagination({ currentPage, totalPages, onPageChange }) {
|
|
17
|
+
const translate = useTranslations();
|
|
18
|
+
if (totalPages <= 1) return null;
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
"button",
|
|
22
|
+
{
|
|
23
|
+
type: "button",
|
|
24
|
+
"aria-label": translate("common.account.workspace.pagination.previous"),
|
|
25
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
26
|
+
className: "size-8 flex items-center justify-center rounded-lg text-zinc-600 hover:bg-zinc-100 transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
|
|
27
|
+
disabled: currentPage === 1,
|
|
28
|
+
children: /* @__PURE__ */ jsx(IconChevronLeft, { size: 24 })
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5", children: buildPages(currentPage, totalPages).map(
|
|
32
|
+
(page, index) => page === "ellipsis" ? /* @__PURE__ */ jsx(
|
|
33
|
+
"span",
|
|
34
|
+
{
|
|
35
|
+
className: "h-8 min-w-8 px-1.5 flex items-center justify-center paragraph-small-semibold text-zinc-600",
|
|
36
|
+
children: "..."
|
|
37
|
+
},
|
|
38
|
+
`ellipsis-${index}`
|
|
39
|
+
) : /* @__PURE__ */ jsx(
|
|
40
|
+
"button",
|
|
41
|
+
{
|
|
42
|
+
type: "button",
|
|
43
|
+
onClick: () => onPageChange(page),
|
|
44
|
+
className: cn(
|
|
45
|
+
"h-8 min-w-8 px-1.5 flex items-center justify-center rounded-lg paragraph-small-semibold transition-colors cursor-pointer",
|
|
46
|
+
currentPage === page ? "bg-white border border-zinc-200 text-zinc-950" : "text-zinc-600 hover:bg-zinc-100"
|
|
47
|
+
),
|
|
48
|
+
children: page
|
|
49
|
+
},
|
|
50
|
+
page
|
|
51
|
+
)
|
|
52
|
+
) }),
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
"button",
|
|
55
|
+
{
|
|
56
|
+
type: "button",
|
|
57
|
+
"aria-label": translate("common.account.workspace.pagination.next"),
|
|
58
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
59
|
+
className: "size-8 flex items-center justify-center rounded-lg bg-white border border-zinc-200 text-zinc-600 hover:bg-zinc-100 transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
|
|
60
|
+
disabled: currentPage === totalPages,
|
|
61
|
+
children: /* @__PURE__ */ jsx(IconChevronRight, { size: 24 })
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
ListPagination
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=ListPagination.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/ListPagination.tsx"],"sourcesContent":["'use client';\n\nimport { IconChevronLeft, IconChevronRight } from '@tabler/icons-react';\nimport { useTranslations } from 'next-intl';\nimport { cn } from '../../../../infra/utils/clsx';\n\ntype ListPaginationProps = {\n currentPage: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n};\n\n/** Páginas visíveis: primeira, vizinhas da atual e última, com reticências nos saltos. */\nfunction buildPages(currentPage: number, totalPages: number): (number | 'ellipsis')[] {\n const pages: (number | 'ellipsis')[] = [1];\n\n if (currentPage > 3) pages.push('ellipsis');\n\n for (let page = Math.max(2, currentPage - 1); page <= Math.min(totalPages - 1, currentPage + 1); page++) {\n if (!pages.includes(page)) pages.push(page);\n }\n\n if (currentPage < totalPages - 2) pages.push('ellipsis');\n if (totalPages > 1 && !pages.includes(totalPages)) pages.push(totalPages);\n\n return pages;\n}\n\nexport function ListPagination({ currentPage, totalPages, onPageChange }: ListPaginationProps) {\n const translate = useTranslations();\n\n if (totalPages <= 1) return null;\n\n return (\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n aria-label={translate('common.account.workspace.pagination.previous')}\n onClick={() => onPageChange(currentPage - 1)}\n className=\"size-8 flex items-center justify-center rounded-lg text-zinc-600 hover:bg-zinc-100 transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed\"\n disabled={currentPage === 1}\n >\n <IconChevronLeft size={24} />\n </button>\n\n <div className=\"flex items-center gap-1.5\">\n {buildPages(currentPage, totalPages).map((page, index) =>\n page === 'ellipsis' ? (\n <span\n key={`ellipsis-${index}`}\n className=\"h-8 min-w-8 px-1.5 flex items-center justify-center paragraph-small-semibold text-zinc-600\"\n >\n ...\n </span>\n ) : (\n <button\n key={page}\n type=\"button\"\n onClick={() => onPageChange(page)}\n className={cn(\n 'h-8 min-w-8 px-1.5 flex items-center justify-center rounded-lg paragraph-small-semibold transition-colors cursor-pointer',\n currentPage === page\n ? 'bg-white border border-zinc-200 text-zinc-950'\n : 'text-zinc-600 hover:bg-zinc-100'\n )}\n >\n {page}\n </button>\n )\n )}\n </div>\n\n <button\n type=\"button\"\n aria-label={translate('common.account.workspace.pagination.next')}\n onClick={() => onPageChange(currentPage + 1)}\n className=\"size-8 flex items-center justify-center rounded-lg bg-white border border-zinc-200 text-zinc-600 hover:bg-zinc-100 transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed\"\n disabled={currentPage === totalPages}\n >\n <IconChevronRight size={24} />\n </button>\n </div>\n );\n}\n"],"mappings":";AAkCI,SAQI,KARJ;AAhCJ,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,uBAAuB;AAChC,SAAS,UAAU;AASnB,SAAS,WAAW,aAAqB,YAA6C;AACpF,QAAM,QAAiC,CAAC,CAAC;AAEzC,MAAI,cAAc,EAAG,OAAM,KAAK,UAAU;AAE1C,WAAS,OAAO,KAAK,IAAI,GAAG,cAAc,CAAC,GAAG,QAAQ,KAAK,IAAI,aAAa,GAAG,cAAc,CAAC,GAAG,QAAQ;AACvG,QAAI,CAAC,MAAM,SAAS,IAAI,EAAG,OAAM,KAAK,IAAI;AAAA,EAC5C;AAEA,MAAI,cAAc,aAAa,EAAG,OAAM,KAAK,UAAU;AACvD,MAAI,aAAa,KAAK,CAAC,MAAM,SAAS,UAAU,EAAG,OAAM,KAAK,UAAU;AAExE,SAAO;AACT;AAEO,SAAS,eAAe,EAAE,aAAa,YAAY,aAAa,GAAwB;AAC7F,QAAM,YAAY,gBAAgB;AAElC,MAAI,cAAc,EAAG,QAAO;AAE5B,SACE,qBAAC,SAAI,WAAU,2BACb;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY,UAAU,8CAA8C;AAAA,QACpE,SAAS,MAAM,aAAa,cAAc,CAAC;AAAA,QAC3C,WAAU;AAAA,QACV,UAAU,gBAAgB;AAAA,QAE1B,8BAAC,mBAAgB,MAAM,IAAI;AAAA;AAAA,IAC7B;AAAA,IAEA,oBAAC,SAAI,WAAU,6BACZ,qBAAW,aAAa,UAAU,EAAE;AAAA,MAAI,CAAC,MAAM,UAC9C,SAAS,aACP;AAAA,QAAC;AAAA;AAAA,UAEC,WAAU;AAAA,UACX;AAAA;AAAA,QAFM,YAAY,KAAK;AAAA,MAIxB,IAEA;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,SAAS,MAAM,aAAa,IAAI;AAAA,UAChC,WAAW;AAAA,YACT;AAAA,YACA,gBAAgB,OACZ,kDACA;AAAA,UACN;AAAA,UAEC;AAAA;AAAA,QAVI;AAAA,MAWP;AAAA,IAEJ,GACF;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY,UAAU,0CAA0C;AAAA,QAChE,SAAS,MAAM,aAAa,cAAc,CAAC;AAAA,QAC3C,WAAU;AAAA,QACV,UAAU,gBAAgB;AAAA,QAE1B,8BAAC,oBAAiB,MAAM,IAAI;AAAA;AAAA,IAC9B;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { IconDotsVertical } from "@tabler/icons-react";
|
|
5
|
+
import { Button } from "../../../ui/buttons/Button";
|
|
6
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../../ui/overlay/Popover";
|
|
7
|
+
import { NavBarItem } from "../../../layouts/NavBarItem";
|
|
8
|
+
import { cn } from "../../../../infra/utils/clsx";
|
|
9
|
+
function RowActionsMenu({ items, width = 160, className }) {
|
|
10
|
+
const [open, setOpen] = useState(false);
|
|
11
|
+
if (items.length === 0) return null;
|
|
12
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
13
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
14
|
+
Button,
|
|
15
|
+
{
|
|
16
|
+
variant: "ghost",
|
|
17
|
+
size: "icon-lg",
|
|
18
|
+
className: cn("size-10 hover:bg-zinc-100 rounded-lg", className),
|
|
19
|
+
onClick: (event) => event.stopPropagation(),
|
|
20
|
+
children: /* @__PURE__ */ jsx(IconDotsVertical, { size: 20 })
|
|
21
|
+
}
|
|
22
|
+
) }),
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
PopoverContent,
|
|
25
|
+
{
|
|
26
|
+
align: "end",
|
|
27
|
+
sideOffset: 8,
|
|
28
|
+
className: "p-0 bg-white rounded-2xl shadow-none border border-zinc-200",
|
|
29
|
+
style: { width },
|
|
30
|
+
onClick: (event) => event.stopPropagation(),
|
|
31
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5 p-1.5 rounded-xl", children: items.map((item) => /* @__PURE__ */ jsx(
|
|
32
|
+
NavBarItem,
|
|
33
|
+
{
|
|
34
|
+
icon: item.icon,
|
|
35
|
+
label: item.label,
|
|
36
|
+
className: item.destructive ? "hover:bg-red-50" : void 0,
|
|
37
|
+
labelClassName: item.destructive ? "text-red-600" : void 0,
|
|
38
|
+
onClick: () => {
|
|
39
|
+
setOpen(false);
|
|
40
|
+
item.onClick();
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
item.label
|
|
44
|
+
)) })
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
RowActionsMenu
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=RowActionsMenu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/RowActionsMenu.tsx"],"sourcesContent":["'use client';\n\nimport { useState, type ReactNode } from 'react';\nimport { IconDotsVertical } from '@tabler/icons-react';\nimport { Button } from '../../../ui/buttons/Button';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../../ui/overlay/Popover';\nimport { NavBarItem } from '../../../layouts/NavBarItem';\nimport { cn } from '../../../../infra/utils/clsx';\n\nexport type RowActionsMenuItem = {\n icon: ReactNode;\n label: string;\n onClick: () => void;\n destructive?: boolean;\n};\n\ntype RowActionsMenuProps = {\n items: RowActionsMenuItem[];\n width?: number;\n className?: string;\n};\n\n/** Menu ⋮ das linhas e cards das abas do modal Minha conta. */\nexport function RowActionsMenu({ items, width = 160, className }: RowActionsMenuProps) {\n const [open, setOpen] = useState(false);\n\n if (items.length === 0) return null;\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon-lg\"\n className={cn('size-10 hover:bg-zinc-100 rounded-lg', className)}\n onClick={(event) => event.stopPropagation()}\n >\n <IconDotsVertical size={20} />\n </Button>\n </PopoverTrigger>\n <PopoverContent\n align=\"end\"\n sideOffset={8}\n className=\"p-0 bg-white rounded-2xl shadow-none border border-zinc-200\"\n style={{ width }}\n onClick={(event) => event.stopPropagation()}\n >\n <div className=\"flex flex-col gap-0.5 p-1.5 rounded-xl\">\n {items.map((item) => (\n <NavBarItem\n key={item.label}\n icon={item.icon}\n label={item.label}\n className={item.destructive ? 'hover:bg-red-50' : undefined}\n labelClassName={item.destructive ? 'text-red-600' : undefined}\n onClick={() => {\n setOpen(false);\n item.onClick();\n }}\n />\n ))}\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";AA6BI,SAQM,KARN;AA3BJ,SAAS,gBAAgC;AACzC,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AAgBZ,SAAS,eAAe,EAAE,OAAO,QAAQ,KAAK,UAAU,GAAwB;AACrF,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AAEtC,MAAI,MAAM,WAAW,EAAG,QAAO;AAE/B,SACE,qBAAC,WAAQ,MAAY,cAAc,SACjC;AAAA,wBAAC,kBAAe,SAAO,MACrB;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAW,GAAG,wCAAwC,SAAS;AAAA,QAC/D,SAAS,CAAC,UAAU,MAAM,gBAAgB;AAAA,QAE1C,8BAAC,oBAAiB,MAAM,IAAI;AAAA;AAAA,IAC9B,GACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,OAAM;AAAA,QACN,YAAY;AAAA,QACZ,WAAU;AAAA,QACV,OAAO,EAAE,MAAM;AAAA,QACf,SAAS,CAAC,UAAU,MAAM,gBAAgB;AAAA,QAE1C,8BAAC,SAAI,WAAU,0CACZ,gBAAM,IAAI,CAAC,SACV;AAAA,UAAC;AAAA;AAAA,YAEC,MAAM,KAAK;AAAA,YACX,OAAO,KAAK;AAAA,YACZ,WAAW,KAAK,cAAc,oBAAoB;AAAA,YAClD,gBAAgB,KAAK,cAAc,iBAAiB;AAAA,YACpD,SAAS,MAAM;AACb,sBAAQ,KAAK;AACb,mBAAK,QAAQ;AAAA,YACf;AAAA;AAAA,UARK,KAAK;AAAA,QASZ,CACD,GACH;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { IconAlertTriangle } from "@tabler/icons-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { Button } from "../../../ui/buttons/Button";
|
|
6
|
+
import { IconBox } from "./IconBox";
|
|
7
|
+
function SectionLoadError({ message, onRetry }) {
|
|
8
|
+
const translate = useTranslations();
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-between gap-6 p-5 lg:p-6 bg-zinc-50 rounded-lg", children: [
|
|
10
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
11
|
+
/* @__PURE__ */ jsx(IconBox, { icon: IconAlertTriangle }),
|
|
12
|
+
/* @__PURE__ */ jsx("span", { className: "paragraph-medium-semibold text-zinc-950", children: message })
|
|
13
|
+
] }),
|
|
14
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onRetry, className: "w-fit h-10!", children: translate("common.account.workspace.loadFailedRetry") })
|
|
15
|
+
] });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
SectionLoadError
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=SectionLoadError.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/SectionLoadError.tsx"],"sourcesContent":["'use client';\n\nimport { IconAlertTriangle } from '@tabler/icons-react';\nimport { useTranslations } from 'next-intl';\nimport { Button } from '../../../ui/buttons/Button';\nimport { IconBox } from './IconBox';\n\ntype SectionLoadErrorProps = {\n message: string;\n onRetry: () => void;\n};\n\nexport function SectionLoadError({ message, onRetry }: SectionLoadErrorProps) {\n const translate = useTranslations();\n\n return (\n <div className=\"flex flex-col justify-between gap-6 p-5 lg:p-6 bg-zinc-50 rounded-lg\">\n <div className=\"flex items-center gap-4\">\n <IconBox icon={IconAlertTriangle} />\n <span className=\"paragraph-medium-semibold text-zinc-950\">{message}</span>\n </div>\n <Button variant=\"secondary\" onClick={onRetry} className=\"w-fit h-10!\">\n {translate('common.account.workspace.loadFailedRetry')}\n </Button>\n </div>\n );\n}\n"],"mappings":";AAiBM,SACE,KADF;AAfN,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAChC,SAAS,cAAc;AACvB,SAAS,eAAe;AAOjB,SAAS,iBAAiB,EAAE,SAAS,QAAQ,GAA0B;AAC5E,QAAM,YAAY,gBAAgB;AAElC,SACE,qBAAC,SAAI,WAAU,wEACb;AAAA,yBAAC,SAAI,WAAU,2BACb;AAAA,0BAAC,WAAQ,MAAM,mBAAmB;AAAA,MAClC,oBAAC,UAAK,WAAU,2CAA2C,mBAAQ;AAAA,OACrE;AAAA,IACA,oBAAC,UAAO,SAAQ,aAAY,SAAS,SAAS,WAAU,eACrD,oBAAU,0CAA0C,GACvD;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../../infra/utils/clsx";
|
|
3
|
+
const TONE_CLASSES = {
|
|
4
|
+
neutral: "bg-zinc-50 border-zinc-100 text-zinc-500",
|
|
5
|
+
blue: "bg-blue-50 border-blue-100 text-blue-600",
|
|
6
|
+
green: "bg-green-50 border-green-100 text-green-600",
|
|
7
|
+
yellow: "bg-yellow-50 border-yellow-100 text-yellow-600",
|
|
8
|
+
red: "bg-red-50 border-red-100 text-red-600"
|
|
9
|
+
};
|
|
10
|
+
function StatusBadge({ tone = "neutral", className, children }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
"span",
|
|
13
|
+
{
|
|
14
|
+
className: cn(
|
|
15
|
+
"inline-flex items-center justify-center gap-1 px-1.5 py-1 rounded-md border paragraph-xsmall-semibold whitespace-nowrap w-fit",
|
|
16
|
+
TONE_CLASSES[tone],
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
children
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
StatusBadge
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=StatusBadge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/StatusBadge.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { cn } from '../../../../infra/utils/clsx';\n\nexport type StatusBadgeTone = 'neutral' | 'blue' | 'green' | 'yellow' | 'red';\n\nconst TONE_CLASSES: Record<StatusBadgeTone, string> = {\n neutral: 'bg-zinc-50 border-zinc-100 text-zinc-500',\n blue: 'bg-blue-50 border-blue-100 text-blue-600',\n green: 'bg-green-50 border-green-100 text-green-600',\n yellow: 'bg-yellow-50 border-yellow-100 text-yellow-600',\n red: 'bg-red-50 border-red-100 text-red-600',\n};\n\ntype StatusBadgeProps = {\n tone?: StatusBadgeTone;\n className?: string;\n children: ReactNode;\n};\n\n/** Badge de status no padrão dos apps: `rounded-md`, 12px semibold e par de cor 50/100. */\nexport function StatusBadge({ tone = 'neutral', className, children }: StatusBadgeProps) {\n return (\n <span\n className={cn(\n 'inline-flex items-center justify-center gap-1 px-1.5 py-1 rounded-md border paragraph-xsmall-semibold whitespace-nowrap w-fit',\n TONE_CLASSES[tone],\n className\n )}\n >\n {children}\n </span>\n );\n}\n"],"mappings":"AAsBI;AArBJ,SAAS,UAAU;AAInB,MAAM,eAAgD;AAAA,EACpD,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AACP;AASO,SAAS,YAAY,EAAE,OAAO,WAAW,WAAW,SAAS,GAAqB;AACvF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,aAAa,IAAI;AAAA,QACjB;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSectionCount } from "../../AccountModalLayout";
|
|
3
|
+
function WorkspaceSection({ count, children }) {
|
|
4
|
+
useSectionCount(count);
|
|
5
|
+
return /* @__PURE__ */ jsx("div", { className: "h-full overflow-y-auto overscroll-contain [scrollbar-width:auto] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-zinc-300 px-4 py-5 pb-20 lg:px-8 lg:py-6 flex flex-col gap-5 lg:gap-8 *:shrink-0", children });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
WorkspaceSection
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=WorkspaceSection.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/account/sections/shared/WorkspaceSection.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { useSectionCount } from '../../AccountModalLayout';\n\ntype WorkspaceSectionProps = {\n /** Total de registros mostrado ao lado do título no topo do modal. */\n count?: number;\n children: ReactNode;\n};\n\n/**\n * Área rolável de uma aba do modal Minha conta. Os filhos não encolhem: numa coluna flex de altura\n * fixa, uma lista com overflow-hidden seria espremida e cortaria as últimas linhas.\n */\nexport function WorkspaceSection({ count, children }: WorkspaceSectionProps) {\n useSectionCount(count);\n\n return (\n <div className=\"h-full overflow-y-auto overscroll-contain [scrollbar-width:auto] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-zinc-300 px-4 py-5 pb-20 lg:px-8 lg:py-6 flex flex-col gap-5 lg:gap-8 *:shrink-0\">\n {children}\n </div>\n );\n}\n"],"mappings":"AAiBI;AAhBJ,SAAS,uBAAuB;AAYzB,SAAS,iBAAiB,EAAE,OAAO,SAAS,GAA0B;AAC3E,kBAAgB,KAAK;AAErB,SACE,oBAAC,SAAI,WAAU,wSACZ,UACH;AAEJ;","names":[]}
|