forlogic-core 3.0.10 → 4.0.0
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/bin/ds-knowledge.js +129 -0
- package/dist/action-plans/index.esm.js +1 -1
- package/dist/action-plans/index.js +1 -1
- package/dist/assets/fonts/Roobert-Bold.woff2 +0 -0
- package/dist/assets/fonts/Roobert-Regular.woff2 +0 -0
- package/dist/assets/fonts/Roobert-RegularItalic.woff2 +0 -0
- package/dist/audit-trail/index.esm.js +1 -1
- package/dist/audit-trail/index.js +1 -1
- package/dist/auth/commonV5RedirectSuppression.d.ts +6 -0
- package/dist/auth/components/ProfilePhotoDialog.d.ts +25 -0
- package/dist/auth/contexts/AuthContext.d.ts +11 -0
- package/dist/components/dashboards/panels/index.d.ts +1 -0
- package/dist/components/dashboards/panels/panel-chart-theme.d.ts +111 -0
- package/dist/components/insights/index.d.ts +11 -0
- package/dist/components/insights/insight-card.d.ts +88 -0
- package/dist/components/insights/insight-motion.d.ts +222 -0
- package/dist/components/insights/insight-phases.d.ts +52 -0
- package/dist/components/insights/insight-primitives.d.ts +289 -0
- package/dist/components/insights/insight-tokens.d.ts +71 -0
- package/dist/components/insights/insight-variants.d.ts +153 -0
- package/dist/components/insights/insight-widgets.d.ts +145 -0
- package/dist/components/layout/AppHeader.d.ts +6 -0
- package/dist/components/layout/AppLayout.d.ts +8 -0
- package/dist/components/layout/AppSidebar.d.ts +8 -1
- package/dist/components/layout/HeaderLegacyMenu.d.ts +18 -0
- package/dist/components/layout/HeaderUserMenu.d.ts +24 -0
- package/dist/components/layout/PageHeader.d.ts +46 -0
- package/dist/components/layout/PageHeaderScope.d.ts +16 -0
- package/dist/components/layout/SectionHeading.d.ts +57 -0
- package/dist/components/layout/SidebarAtoms.d.ts +60 -0
- package/dist/components/layout/SidebarBrandBar.d.ts +27 -0
- package/dist/components/layout/sidebar-utils.d.ts +2 -0
- package/dist/components/ui/accordion.d.ts +50 -5
- package/dist/components/ui/action-button.d.ts +1 -1
- package/dist/components/ui/alert-dialog.d.ts +11 -5
- package/dist/components/ui/alert.d.ts +1 -1
- package/dist/components/ui/badge.d.ts +17 -12
- package/dist/components/ui/breadcrumb-icons.d.ts +24 -0
- package/dist/components/ui/breadcrumb.d.ts +27 -1
- package/dist/components/ui/button.d.ts +9 -22
- package/dist/components/ui/calendar.d.ts +13 -2
- package/dist/components/ui/card-select-dialog.d.ts +59 -0
- package/dist/components/ui/card.d.ts +27 -3
- package/dist/components/ui/combobox.d.ts +1 -2
- package/dist/components/ui/confirm-dialog.d.ts +61 -0
- package/dist/components/ui/date-picker-themed.d.ts +98 -0
- package/dist/components/ui/date-picker-variants.d.ts +104 -0
- package/dist/components/ui/delete-account-dialog.d.ts +25 -0
- package/dist/components/ui/dialog-signal.d.ts +42 -0
- package/dist/components/ui/dialog-wizard.d.ts +42 -26
- package/dist/components/ui/dialog.d.ts +32 -13
- package/dist/components/ui/disabled-menu-item.d.ts +2 -0
- package/dist/components/ui/feature-announcement-dialog.d.ts +46 -0
- package/dist/components/ui/forlogic-assembly.d.ts +42 -0
- package/dist/components/ui/forlogic-loader.d.ts +50 -0
- package/dist/components/ui/forlogic-mark.d.ts +25 -0
- package/dist/components/ui/icon-hover-duotone.d.ts +19 -0
- package/dist/components/ui/input-group.d.ts +3 -3
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/kanban-card.d.ts +104 -0
- package/dist/components/ui/overlay-title.d.ts +23 -0
- package/dist/components/ui/page-breadcrumb.d.ts +42 -27
- package/dist/components/ui/progress.d.ts +3 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/scroll-area.d.ts +1 -1
- package/dist/components/ui/select.d.ts +4 -1
- package/dist/components/ui/selection-chip.d.ts +35 -0
- package/dist/components/ui/share-link-dialog.d.ts +31 -0
- package/dist/components/ui/sheet.d.ts +12 -10
- package/dist/components/ui/side-panel.d.ts +32 -0
- package/dist/components/ui/sidebar.d.ts +7 -14
- package/dist/components/ui/sonner.d.ts +12 -1
- package/dist/components/ui/spinner.d.ts +30 -6
- package/dist/components/ui/split-button.d.ts +5 -5
- package/dist/components/ui/stat-card.d.ts +97 -0
- package/dist/components/ui/status-badge.d.ts +54 -24
- package/dist/components/ui/status-bar.d.ts +43 -0
- package/dist/components/ui/table-dialog.d.ts +51 -0
- package/dist/components/ui/table.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts +36 -28
- package/dist/components/ui/textarea.d.ts +2 -0
- package/dist/components/ui/toggle-group.d.ts +4 -4
- package/dist/components/ui/toggle.d.ts +4 -4
- package/dist/components/ui/typography.d.ts +1 -1
- package/dist/crud/actions/qualityActions.d.ts +55 -0
- package/dist/crud/actions/useRowActions.d.ts +114 -0
- package/dist/crud/components/ActionMenuItems.d.ts +6 -9
- package/dist/crud/components/ColumnManagerMenu.d.ts +56 -0
- package/dist/crud/components/ColumnSettingsPopover.d.ts +7 -3
- package/dist/crud/components/ContextMenu.d.ts +8 -5
- package/dist/crud/components/CrudActionBar.d.ts +3 -1
- package/dist/crud/components/CrudGrid.d.ts +7 -1
- package/dist/crud/components/CrudTable.d.ts +39 -8
- package/dist/crud/components/InlineRowActions.d.ts +9 -5
- package/dist/crud/components/KanbanActionBar.d.ts +67 -0
- package/dist/crud/components/RowActions.d.ts +30 -0
- package/dist/crud/components/RowActionsMenuItems.d.ts +19 -0
- package/dist/crud/components/RowContextMenu.d.ts +21 -0
- package/dist/crud/components/SelectionToolbar.d.ts +27 -0
- package/dist/crud/components/TableRowActions.d.ts +11 -8
- package/dist/crud/createCrudPage.d.ts +0 -3
- package/dist/crud/createSimpleService.d.ts +0 -2
- package/dist/crud/hooks/useColumnDragReorder.d.ts +18 -0
- package/dist/crud/hooks/useColumnManager.d.ts +7 -1
- package/dist/crud/hooks/useCrud.d.ts +1 -5
- package/dist/crud/primitives/ActionMenu.d.ts +10 -54
- package/dist/crud/utils/columnTitle.d.ts +37 -0
- package/dist/exports/crud.d.ts +17 -0
- package/dist/exports/legacy.d.ts +10 -0
- package/dist/exports/ui.d.ts +20 -1
- package/dist/hooks/useHorizontalOverflow.d.ts +17 -0
- package/dist/hooks/usePrefersReducedMotion.d.ts +9 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/leadership/index.esm.js +1 -1
- package/dist/leadership/index.js +1 -1
- package/dist/legacy/components/ErrorBoundary.d.ts +19 -0
- package/dist/legacy/components/dashboards/dashboard-form.d.ts +65 -0
- package/dist/legacy/components/dashboards/dashboard-general-view.d.ts +124 -0
- package/dist/legacy/components/dashboards/dashboard-grid.d.ts +66 -0
- package/dist/legacy/components/dashboards/dashboard-list.d.ts +41 -0
- package/dist/legacy/components/dashboards/dashboard-view.d.ts +48 -0
- package/dist/legacy/components/dashboards/panels/burndown-panel.d.ts +42 -0
- package/dist/legacy/components/dashboards/panels/cartesian-panel.d.ts +67 -0
- package/dist/legacy/components/dashboards/panels/list-panel.d.ts +45 -0
- package/dist/legacy/components/dashboards/panels/matrix-risk-panel.d.ts +75 -0
- package/dist/legacy/components/dashboards/panels/numeric-panel.d.ts +33 -0
- package/dist/legacy/components/dashboards/panels/panel-error.d.ts +19 -0
- package/dist/legacy/components/dashboards/panels/panel-header.d.ts +27 -0
- package/dist/legacy/components/dashboards/panels/panel-loader.d.ts +18 -0
- package/dist/legacy/components/dashboards/panels/panel-no-data.d.ts +17 -0
- package/dist/legacy/components/dashboards/panels/panel-unavailable.d.ts +17 -0
- package/dist/legacy/components/dashboards/panels/pareto-panel.d.ts +31 -0
- package/dist/legacy/components/dashboards/panels/performance-panel.d.ts +40 -0
- package/dist/legacy/components/dashboards/panels/pie-panel.d.ts +30 -0
- package/dist/legacy/components/dashboards/panels/text-panel.d.ts +29 -0
- package/dist/legacy/components/layout/AppLayout.d.ts +11 -0
- package/dist/legacy/components/layout/AppSidebar.d.ts +10 -0
- package/dist/legacy/components/layout/BodyContent.d.ts +60 -0
- package/dist/legacy/components/layout/PageHeader.d.ts +26 -0
- package/dist/legacy/components/layout/SidebarActionTrigger.d.ts +46 -0
- package/dist/legacy/components/layout/SidebarHeader.d.ts +5 -0
- package/dist/legacy/components/layout/SidebarLogo.d.ts +5 -0
- package/dist/legacy/components/modules/AccessDeniedDialog.d.ts +43 -0
- package/dist/legacy/components/modules/ModuleAccessGuard.d.ts +61 -0
- package/dist/legacy/components/modules/ModuleGrid.d.ts +9 -0
- package/dist/legacy/components/modules/ModuleOfferContent.d.ts +20 -0
- package/dist/legacy/components/modules/ModulesContent.d.ts +23 -0
- package/dist/legacy/components/modules/ModulesDialog.d.ts +3 -0
- package/dist/legacy/components/modules/ModulesFooterCards.d.ts +10 -0
- package/dist/legacy/components/modules/icons/ModulesCardIcons.d.ts +20 -0
- package/dist/legacy/components/modules/types.d.ts +45 -0
- package/dist/legacy/components/ui/alert-dialog.d.ts +102 -0
- package/dist/legacy/components/ui/alert.d.ts +44 -0
- package/dist/legacy/components/ui/badge.d.ts +41 -0
- package/dist/legacy/components/ui/breadcrumb.d.ts +73 -0
- package/dist/legacy/components/ui/button.d.ts +66 -0
- package/dist/legacy/components/ui/calendar.d.ts +27 -0
- package/dist/legacy/components/ui/chart.d.ts +97 -0
- package/dist/legacy/components/ui/combo-tree.d.ts +103 -0
- package/dist/legacy/components/ui/combobox.d.ts +66 -0
- package/dist/legacy/components/ui/command.d.ts +89 -0
- package/dist/legacy/components/ui/context-menu.d.ts +122 -0
- package/dist/legacy/components/ui/data-list.d.ts +86 -0
- package/dist/legacy/components/ui/date-picker.d.ts +31 -0
- package/dist/legacy/components/ui/dialog-wizard.d.ts +100 -0
- package/dist/legacy/components/ui/dialog.d.ts +229 -0
- package/dist/legacy/components/ui/drawer.d.ts +94 -0
- package/dist/legacy/components/ui/dropdown-menu.d.ts +180 -0
- package/dist/legacy/components/ui/electronic-signature-dialog.d.ts +32 -0
- package/dist/legacy/components/ui/empty-state.d.ts +79 -0
- package/dist/legacy/components/ui/export-dialog.d.ts +48 -0
- package/dist/legacy/components/ui/forlogic-assembly.d.ts +32 -0
- package/dist/legacy/components/ui/forlogic-loader.d.ts +30 -0
- package/dist/legacy/components/ui/forlogic-mark.d.ts +25 -0
- package/dist/legacy/components/ui/form.d.ts +119 -0
- package/dist/legacy/components/ui/grid.d.ts +53 -0
- package/dist/legacy/components/ui/iframe-dialog.d.ts +25 -0
- package/dist/legacy/components/ui/input-group.d.ts +113 -0
- package/dist/legacy/components/ui/loading-state.d.ts +52 -0
- package/dist/legacy/components/ui/menubar.d.ts +113 -0
- package/dist/legacy/components/ui/multiselect-permissions.d.ts +84 -0
- package/dist/legacy/components/ui/online-editor-dialog.d.ts +29 -0
- package/dist/legacy/components/ui/page-breadcrumb.d.ts +77 -0
- package/dist/legacy/components/ui/pagination.d.ts +81 -0
- package/dist/legacy/components/ui/report-request-list.d.ts +65 -0
- package/dist/legacy/components/ui/resizable.d.ts +38 -0
- package/dist/legacy/components/ui/select.d.ts +94 -0
- package/dist/legacy/components/ui/sheet.d.ts +108 -0
- package/dist/legacy/components/ui/sidebar.d.ts +269 -0
- package/dist/legacy/components/ui/skeleton-variants.d.ts +41 -0
- package/dist/legacy/components/ui/skeleton.d.ts +14 -0
- package/dist/legacy/components/ui/sonner.d.ts +8 -0
- package/dist/legacy/components/ui/spinner.d.ts +11 -0
- package/dist/legacy/components/ui/split-button.d.ts +77 -0
- package/dist/legacy/components/ui/stack.d.ts +17 -0
- package/dist/legacy/components/ui/stat-card.d.ts +95 -0
- package/dist/legacy/components/ui/status-badge.d.ts +53 -0
- package/dist/legacy/components/ui/step-selector.d.ts +47 -0
- package/dist/legacy/components/ui/stimulsoft-viewer.d.ts +29 -0
- package/dist/legacy/components/ui/tab-page-layout.d.ts +52 -0
- package/dist/legacy/components/ui/terms-of-use-dialog.d.ts +103 -0
- package/dist/legacy/components/ui/toggle-group.d.ts +37 -0
- package/dist/legacy/components/ui/toggle.d.ts +33 -0
- package/dist/legacy/components/ui/tooltip.d.ts +61 -0
- package/dist/legacy/components/ui/truncated-cell.d.ts +20 -0
- package/dist/legacy/components/ui/updates-notification.d.ts +53 -0
- package/dist/legacy/components/ui/users-groups-selector.d.ts +88 -0
- package/dist/legacy/components/ui/viewer-dialog.d.ts +185 -0
- package/dist/legacy/crud/components/BaseForm.d.ts +53 -0
- package/dist/legacy/crud/components/ColumnSettingsPopover.d.ts +29 -0
- package/dist/legacy/crud/components/ContextMenu.d.ts +22 -0
- package/dist/legacy/crud/components/CrudActionBar.d.ts +59 -0
- package/dist/legacy/crud/components/CrudGrid.d.ts +53 -0
- package/dist/legacy/crud/components/CrudPagination.d.ts +18 -0
- package/dist/legacy/crud/components/CrudTable.d.ts +68 -0
- package/dist/legacy/crud/components/FilterBar.d.ts +136 -0
- package/dist/legacy/crud/components/GroupDropZone.d.ts +17 -0
- package/dist/legacy/crud/components/TableFooter.d.ts +15 -0
- package/dist/legacy/crud/createCrudPage.d.ts +140 -0
- package/dist/legacy/crud/createSimpleService.d.ts +87 -0
- package/dist/legacy/crud/generateCrudConfig.d.ts +78 -0
- package/dist/legacy/crud/hooks/useBaseForm.d.ts +47 -0
- package/dist/legacy/crud/hooks/useColumnManager.d.ts +85 -0
- package/dist/legacy/crud/hooks/useCrud.d.ts +156 -0
- package/dist/legacy/crud/primitives/ActionMenu.d.ts +70 -0
- package/dist/legacy/crud/primitives/FilterBar.d.ts +70 -0
- package/dist/legacy/crud/primitives/Pagination.d.ts +30 -0
- package/dist/legacy/crud/primitives/Table.d.ts +32 -0
- package/dist/legacy/crud/primitives/TreeTable.d.ts +8 -0
- package/dist/legacy/crud/utils/routingHelpers.d.ts +41 -0
- package/dist/legacy/hooks/useModuleAccess.d.ts +59 -0
- package/dist/legacy/hooks/useSidebarResize.d.ts +37 -0
- package/dist/legacy/index.css +3 -0
- package/dist/legacy/index.d.ts +113 -0
- package/dist/legacy/index.esm.js +1 -0
- package/dist/legacy/index.js +1 -0
- package/dist/motion/tab-crossfade.d.ts +45 -0
- package/dist/places/index.esm.js +1 -1
- package/dist/places/index.js +1 -1
- package/dist/providers/CoreProviders.d.ts +7 -1
- package/dist/sign/index.esm.js +1 -1
- package/dist/sign/index.js +1 -1
- package/dist/tailwind/index.esm.js +79 -8
- package/dist/tailwind/index.js +79 -8
- package/dist/types/sidebar.d.ts +24 -0
- package/dist/types.d.ts +4 -0
- package/dist/versioning/DsVersionSwitch.d.ts +20 -0
- package/dist/versioning/index.d.ts +12 -0
- package/dist/versioning/index.esm.js +1 -0
- package/dist/versioning/index.js +1 -0
- package/dist/versioning/registry.d.ts +28 -0
- package/dist/versioning/resolve-versioned.d.ts +23 -0
- package/dist/versioning/version-context.d.ts +45 -0
- package/dist/versioning/versioned-components.d.ts +20 -0
- package/docs/DS_KNOWLEDGE.md +385 -0
- package/docs/DS_KNOWLEDGE_COMPACT.md +75 -0
- package/docs/design-system/README.md +1 -1
- package/docs/design-system/knowledge/RULES.md +217 -0
- package/package.json +54 -7
- package/.note/memory/features/import/attachment-idempotency-registry.md +0 -8
- package/.note/memory/features/import/attachment-strategy.md +0 -30
- package/.note/memory/patterns/admin-i18n-policy.md +0 -20
- package/.note/memory/patterns/alias-url-resolution.md +0 -69
- package/.note/memory/patterns/doc-sync-rule.md +0 -35
- package/.note/memory/patterns/documentation-standard.md +0 -17
- package/.note/memory/patterns/dynamic-supabase-config.md +0 -4
- package/.note/memory/patterns/environment-detection-logic.md +0 -41
- package/.note/memory/patterns/i18n-architecture.md +0 -3
- package/.note/memory/security/lib-hardening-roadmap.md +0 -45
- package/.note/memory/security/react-router-dom-v7-migration.md +0 -33
- package/.note/memory/security/react19-migration-roadmap.md +0 -66
- package/dist/action-plans/action-plans/components/ActionPlanAttachmentsTab.d.ts +0 -21
- package/dist/action-plans/action-plans/components/ActionPlanCommentsTab.d.ts +0 -21
- package/dist/action-plans/action-plans/components/ActionPlanCostTab.d.ts +0 -15
- package/dist/action-plans/action-plans/components/ActionPlanGeneralTab.d.ts +0 -21
- package/dist/action-plans/action-plans/components/ActionPlanHistoryTab.d.ts +0 -16
- package/dist/action-plans/action-plans/components/ActionPlanPage.d.ts +0 -25
- package/dist/action-plans/action-plans/components/ActionPlanPredecessorsTab.d.ts +0 -15
- package/dist/action-plans/action-plans/components/ActionPlanProgressDialog.d.ts +0 -16
- package/dist/action-plans/action-plans/components/ActionPlanProgressTab.d.ts +0 -10
- package/dist/action-plans/action-plans/components/ActionPlanStatusBadge.d.ts +0 -18
- package/dist/action-plans/action-plans/constants.d.ts +0 -86
- package/dist/action-plans/action-plans/hooks/useActionPlan.d.ts +0 -19
- package/dist/action-plans/action-plans/hooks/useActionPlanProgress.d.ts +0 -20
- package/dist/action-plans/action-plans/index.d.ts +0 -15
- package/dist/action-plans/action-plans/types.d.ts +0 -413
- package/dist/action-plans/action-plans/utils/formatTime.d.ts +0 -24
- package/dist/action-plans/approval-flow/components/ApprovalSidenav.d.ts +0 -16
- package/dist/action-plans/approval-flow/components/ApproveDialog.d.ts +0 -13
- package/dist/action-plans/approval-flow/components/SelectApproverDialog.d.ts +0 -11
- package/dist/action-plans/approval-flow/index.d.ts +0 -4
- package/dist/action-plans/approval-flow/types.d.ts +0 -76
- package/dist/action-plans/assets/index.d.ts +0 -7
- package/dist/action-plans/audit-trail/components/AuditTrailDetails.d.ts +0 -27
- package/dist/action-plans/audit-trail/components/AuditTrailFilter.d.ts +0 -29
- package/dist/action-plans/audit-trail/components/AuditTrailPage.d.ts +0 -40
- package/dist/action-plans/audit-trail/index.d.ts +0 -9
- package/dist/action-plans/audit-trail/types.d.ts +0 -209
- package/dist/action-plans/audit-trail/utils.d.ts +0 -54
- package/dist/action-plans/auth/components/AliasRedirect.d.ts +0 -13
- package/dist/action-plans/auth/components/AliasRouteGuard.d.ts +0 -20
- package/dist/action-plans/auth/components/EditProfileDialog.d.ts +0 -13
- package/dist/action-plans/auth/components/ProtectedRoute.d.ts +0 -11
- package/dist/action-plans/auth/components/UserInfo.d.ts +0 -10
- package/dist/action-plans/auth/contexts/AuthContext.d.ts +0 -89
- package/dist/action-plans/auth/pages/CallbackPage.d.ts +0 -6
- package/dist/action-plans/auth/pages/LoginPage.d.ts +0 -2
- package/dist/action-plans/auth/services/AuthService.d.ts +0 -64
- package/dist/action-plans/auth/services/SupabaseTokenService.d.ts +0 -3
- package/dist/action-plans/auth/services/TokenManager.d.ts +0 -66
- package/dist/action-plans/auth/services/TokenRegenerationService.d.ts +0 -14
- package/dist/action-plans/auth/services/TokenService.d.ts +0 -48
- package/dist/action-plans/auth/utils/ErrorInterceptor.d.ts +0 -20
- package/dist/action-plans/components/ErrorBoundary.d.ts +0 -19
- package/dist/action-plans/components/dashboards/dashboard-form.d.ts +0 -65
- package/dist/action-plans/components/dashboards/dashboard-general-view.d.ts +0 -124
- package/dist/action-plans/components/dashboards/dashboard-grid.d.ts +0 -66
- package/dist/action-plans/components/dashboards/dashboard-list.d.ts +0 -41
- package/dist/action-plans/components/dashboards/dashboard-view.d.ts +0 -48
- package/dist/action-plans/components/dashboards/panels/burndown-panel.d.ts +0 -41
- package/dist/action-plans/components/dashboards/panels/cartesian-panel.d.ts +0 -66
- package/dist/action-plans/components/dashboards/panels/list-panel.d.ts +0 -45
- package/dist/action-plans/components/dashboards/panels/matrix-risk-panel.d.ts +0 -74
- package/dist/action-plans/components/dashboards/panels/numeric-panel.d.ts +0 -32
- package/dist/action-plans/components/dashboards/panels/panel-error.d.ts +0 -18
- package/dist/action-plans/components/dashboards/panels/panel-header.d.ts +0 -27
- package/dist/action-plans/components/dashboards/panels/panel-loader.d.ts +0 -17
- package/dist/action-plans/components/dashboards/panels/panel-no-data.d.ts +0 -16
- package/dist/action-plans/components/dashboards/panels/panel-unavailable.d.ts +0 -16
- package/dist/action-plans/components/dashboards/panels/pareto-panel.d.ts +0 -30
- package/dist/action-plans/components/dashboards/panels/performance-panel.d.ts +0 -39
- package/dist/action-plans/components/dashboards/panels/pie-panel.d.ts +0 -29
- package/dist/action-plans/components/dashboards/panels/text-panel.d.ts +0 -28
- package/dist/action-plans/components/layout/AppLayout.d.ts +0 -10
- package/dist/action-plans/components/layout/AppSidebar.d.ts +0 -10
- package/dist/action-plans/components/layout/BodyContent.d.ts +0 -60
- package/dist/action-plans/components/layout/SidebarActionTrigger.d.ts +0 -46
- package/dist/action-plans/components/layout/SidebarHeader.d.ts +0 -5
- package/dist/action-plans/components/layout/SidebarLogo.d.ts +0 -5
- package/dist/action-plans/components/modules/AccessDeniedDialog.d.ts +0 -43
- package/dist/action-plans/components/modules/ModuleAccessGuard.d.ts +0 -42
- package/dist/action-plans/components/modules/ModuleGrid.d.ts +0 -9
- package/dist/action-plans/components/modules/ModuleOfferContent.d.ts +0 -20
- package/dist/action-plans/components/modules/ModulesContent.d.ts +0 -21
- package/dist/action-plans/components/modules/ModulesDialog.d.ts +0 -3
- package/dist/action-plans/components/modules/ModulesFooterCards.d.ts +0 -10
- package/dist/action-plans/components/modules/icons/ModulesCardIcons.d.ts +0 -19
- package/dist/action-plans/components/modules/types.d.ts +0 -41
- package/dist/action-plans/components/ui/alert-dialog.d.ts +0 -102
- package/dist/action-plans/components/ui/alert.d.ts +0 -44
- package/dist/action-plans/components/ui/badge.d.ts +0 -41
- package/dist/action-plans/components/ui/breadcrumb.d.ts +0 -73
- package/dist/action-plans/components/ui/button.d.ts +0 -66
- package/dist/action-plans/components/ui/calendar.d.ts +0 -24
- package/dist/action-plans/components/ui/chart.d.ts +0 -97
- package/dist/action-plans/components/ui/combo-tree.d.ts +0 -103
- package/dist/action-plans/components/ui/combobox.d.ts +0 -64
- package/dist/action-plans/components/ui/command.d.ts +0 -89
- package/dist/action-plans/components/ui/context-menu.d.ts +0 -122
- package/dist/action-plans/components/ui/data-list.d.ts +0 -86
- package/dist/action-plans/components/ui/date-picker.d.ts +0 -19
- package/dist/action-plans/components/ui/dialog-wizard.d.ts +0 -100
- package/dist/action-plans/components/ui/dialog.d.ts +0 -229
- package/dist/action-plans/components/ui/drawer.d.ts +0 -94
- package/dist/action-plans/components/ui/dropdown-menu.d.ts +0 -180
- package/dist/action-plans/components/ui/electronic-signature-dialog.d.ts +0 -31
- package/dist/action-plans/components/ui/empty-state.d.ts +0 -79
- package/dist/action-plans/components/ui/export-dialog.d.ts +0 -48
- package/dist/action-plans/components/ui/form.d.ts +0 -119
- package/dist/action-plans/components/ui/grid.d.ts +0 -53
- package/dist/action-plans/components/ui/iframe-dialog.d.ts +0 -24
- package/dist/action-plans/components/ui/input-group.d.ts +0 -113
- package/dist/action-plans/components/ui/loading-state.d.ts +0 -52
- package/dist/action-plans/components/ui/menubar.d.ts +0 -113
- package/dist/action-plans/components/ui/multiselect-permissions.d.ts +0 -84
- package/dist/action-plans/components/ui/online-editor-dialog.d.ts +0 -28
- package/dist/action-plans/components/ui/page-breadcrumb.d.ts +0 -77
- package/dist/action-plans/components/ui/pagination.d.ts +0 -81
- package/dist/action-plans/components/ui/report-request-list.d.ts +0 -64
- package/dist/action-plans/components/ui/resizable.d.ts +0 -38
- package/dist/action-plans/components/ui/select.d.ts +0 -94
- package/dist/action-plans/components/ui/sheet.d.ts +0 -108
- package/dist/action-plans/components/ui/sidebar.d.ts +0 -269
- package/dist/action-plans/components/ui/skeleton-variants.d.ts +0 -41
- package/dist/action-plans/components/ui/skeleton.d.ts +0 -14
- package/dist/action-plans/components/ui/sonner.d.ts +0 -8
- package/dist/action-plans/components/ui/spinner.d.ts +0 -11
- package/dist/action-plans/components/ui/split-button.d.ts +0 -76
- package/dist/action-plans/components/ui/stack.d.ts +0 -17
- package/dist/action-plans/components/ui/status-badge.d.ts +0 -52
- package/dist/action-plans/components/ui/step-selector.d.ts +0 -46
- package/dist/action-plans/components/ui/stimulsoft-viewer.d.ts +0 -28
- package/dist/action-plans/components/ui/tab-page-layout.d.ts +0 -52
- package/dist/action-plans/components/ui/terms-of-use-dialog.d.ts +0 -102
- package/dist/action-plans/components/ui/toggle-group.d.ts +0 -37
- package/dist/action-plans/components/ui/toggle.d.ts +0 -33
- package/dist/action-plans/components/ui/tooltip.d.ts +0 -61
- package/dist/action-plans/components/ui/truncated-cell.d.ts +0 -20
- package/dist/action-plans/components/ui/updates-notification.d.ts +0 -47
- package/dist/action-plans/components/ui/users-groups-selector.d.ts +0 -87
- package/dist/action-plans/components/ui/viewer-dialog.d.ts +0 -184
- package/dist/action-plans/config/backend.d.ts +0 -10
- package/dist/action-plans/config/environments.d.ts +0 -27
- package/dist/action-plans/config/index.d.ts +0 -75
- package/dist/action-plans/contexts/LocaleContext.d.ts +0 -15
- package/dist/action-plans/contexts/ModalStateContext.d.ts +0 -57
- package/dist/action-plans/contexts/ModuleContext.d.ts +0 -34
- package/dist/action-plans/contexts/NavigationContext.d.ts +0 -13
- package/dist/action-plans/contexts/PageMetadataContext.d.ts +0 -48
- package/dist/action-plans/crud/components/BaseForm.d.ts +0 -52
- package/dist/action-plans/crud/components/ColumnSettingsPopover.d.ts +0 -28
- package/dist/action-plans/crud/components/ContextMenu.d.ts +0 -21
- package/dist/action-plans/crud/components/CrudActionBar.d.ts +0 -59
- package/dist/action-plans/crud/components/CrudGrid.d.ts +0 -53
- package/dist/action-plans/crud/components/CrudPagination.d.ts +0 -17
- package/dist/action-plans/crud/components/CrudTable.d.ts +0 -66
- package/dist/action-plans/crud/components/FilterBar.d.ts +0 -136
- package/dist/action-plans/crud/components/GroupDropZone.d.ts +0 -16
- package/dist/action-plans/crud/components/TableFooter.d.ts +0 -14
- package/dist/action-plans/crud/createCrudPage.d.ts +0 -134
- package/dist/action-plans/crud/createSimpleService.d.ts +0 -85
- package/dist/action-plans/crud/generateCrudConfig.d.ts +0 -78
- package/dist/action-plans/crud/hooks/useBaseForm.d.ts +0 -47
- package/dist/action-plans/crud/hooks/useColumnManager.d.ts +0 -85
- package/dist/action-plans/crud/hooks/useCrud.d.ts +0 -152
- package/dist/action-plans/crud/primitives/ActionMenu.d.ts +0 -69
- package/dist/action-plans/crud/primitives/FilterBar.d.ts +0 -69
- package/dist/action-plans/crud/primitives/Pagination.d.ts +0 -29
- package/dist/action-plans/crud/primitives/Table.d.ts +0 -31
- package/dist/action-plans/crud/primitives/TreeTable.d.ts +0 -7
- package/dist/action-plans/crud/utils/routingHelpers.d.ts +0 -41
- package/dist/action-plans/custom-form-fields/components/CustomFormFields.d.ts +0 -11
- package/dist/action-plans/custom-form-fields/fields/FormDateField.d.ts +0 -9
- package/dist/action-plans/custom-form-fields/fields/FormMultiSelectionField.d.ts +0 -9
- package/dist/action-plans/custom-form-fields/fields/FormNumericField.d.ts +0 -9
- package/dist/action-plans/custom-form-fields/fields/FormQuestionsField.d.ts +0 -9
- package/dist/action-plans/custom-form-fields/fields/FormSingleSelectionField.d.ts +0 -9
- package/dist/action-plans/custom-form-fields/fields/FormTextField.d.ts +0 -9
- package/dist/action-plans/custom-form-fields/fields/FormTimeField.d.ts +0 -9
- package/dist/action-plans/custom-form-fields/fields/FormUrlField.d.ts +0 -9
- package/dist/action-plans/custom-form-fields/fields/ReadOnlyTextField.d.ts +0 -9
- package/dist/action-plans/custom-form-fields/index.d.ts +0 -13
- package/dist/action-plans/custom-form-fields/types.d.ts +0 -206
- package/dist/action-plans/exports/action-plans.d.ts +0 -16
- package/dist/action-plans/exports/audit-trail.d.ts +0 -1
- package/dist/action-plans/exports/crud.d.ts +0 -31
- package/dist/action-plans/exports/custom-form-fields.d.ts +0 -1
- package/dist/action-plans/exports/file-upload.d.ts +0 -1
- package/dist/action-plans/exports/integrations.d.ts +0 -15
- package/dist/action-plans/exports/ui.d.ts +0 -100
- package/dist/action-plans/file-upload/components/SingleFileUpload.d.ts +0 -102
- package/dist/action-plans/file-upload/index.d.ts +0 -6
- package/dist/action-plans/file-upload/types.d.ts +0 -26
- package/dist/action-plans/file-upload/utils/formatBytes.d.ts +0 -6
- package/dist/action-plans/file-upload/utils/getFileExtension.d.ts +0 -6
- package/dist/action-plans/hooks/useModuleAccess.d.ts +0 -59
- package/dist/action-plans/hooks/useSidebarResize.d.ts +0 -37
- package/dist/action-plans/i18n/LanguageBootstrap.d.ts +0 -14
- package/dist/action-plans/i18n/config.d.ts +0 -13
- package/dist/action-plans/i18n/constants.d.ts +0 -126
- package/dist/action-plans/i18n/index.d.ts +0 -12
- package/dist/action-plans/i18n/utils.d.ts +0 -14
- package/dist/action-plans/integrations/clarity/clarityTracking.d.ts +0 -31
- package/dist/action-plans/integrations/clarity/index.d.ts +0 -3
- package/dist/action-plans/integrations/clarity/types.d.ts +0 -46
- package/dist/action-plans/integrations/clarity/useClarity.d.ts +0 -34
- package/dist/action-plans/integrations/index.d.ts +0 -5
- package/dist/action-plans/leadership/components/LeadershipDialog.d.ts +0 -10
- package/dist/action-plans/leadership/components/LeadershipForm.d.ts +0 -8
- package/dist/action-plans/leadership/components/LeadershipPage.d.ts +0 -19
- package/dist/action-plans/leadership/hooks/useLeadershipApi.d.ts +0 -4
- package/dist/action-plans/leadership/hooks/useLeadershipMutations.d.ts +0 -29
- package/dist/action-plans/leadership/index.d.ts +0 -13
- package/dist/action-plans/leadership/types.d.ts +0 -23
- package/dist/action-plans/leadership/utils/leadershipUtils.d.ts +0 -8
- package/dist/action-plans/media/components/ImageEditor.d.ts +0 -22
- package/dist/action-plans/media/components/ImageRenderer.d.ts +0 -23
- package/dist/action-plans/media/components/VideoEditor.d.ts +0 -2
- package/dist/action-plans/media/components/VideoRenderer.d.ts +0 -2
- package/dist/action-plans/media/hooks/useMediaUpload.d.ts +0 -19
- package/dist/action-plans/media/index.d.ts +0 -49
- package/dist/action-plans/media/types.d.ts +0 -66
- package/dist/action-plans/media/utils/imageHelpers.d.ts +0 -28
- package/dist/action-plans/media/utils/videoHelpers.d.ts +0 -35
- package/dist/action-plans/mind-map/components/MindMap.d.ts +0 -23
- package/dist/action-plans/mind-map/components/MindMapConnection.d.ts +0 -12
- package/dist/action-plans/mind-map/components/MindMapNodeView.d.ts +0 -24
- package/dist/action-plans/mind-map/components/MindMapToolbar.d.ts +0 -26
- package/dist/action-plans/mind-map/hooks/useMindMapKeyboard.d.ts +0 -15
- package/dist/action-plans/mind-map/hooks/useMindMapLayout.d.ts +0 -5
- package/dist/action-plans/mind-map/hooks/useMindMapPanZoom.d.ts +0 -21
- package/dist/action-plans/mind-map/hooks/useMindMapState.d.ts +0 -32
- package/dist/action-plans/mind-map/index.d.ts +0 -4
- package/dist/action-plans/mind-map/types.d.ts +0 -91
- package/dist/action-plans/mind-map/utils/export-image.d.ts +0 -9
- package/dist/action-plans/mind-map/utils/layout.d.ts +0 -15
- package/dist/action-plans/mind-map/utils/nodeOps.d.ts +0 -66
- package/dist/action-plans/mind-map/utils/serialize.d.ts +0 -10
- package/dist/action-plans/modules/softwaresMap.d.ts +0 -4
- package/dist/action-plans/places/components/ManageAccessModal.d.ts +0 -11
- package/dist/action-plans/places/components/PlaceCard.d.ts +0 -12
- package/dist/action-plans/places/components/PlacesList.d.ts +0 -12
- package/dist/action-plans/places/index.d.ts +0 -8
- package/dist/action-plans/places/services/PlaceService.d.ts +0 -9
- package/dist/action-plans/places/types.d.ts +0 -10
- package/dist/action-plans/providers/CoreProviders.d.ts +0 -107
- package/dist/action-plans/providers/index.d.ts +0 -2
- package/dist/action-plans/qualiex/components/QualiexUserField.d.ts +0 -133
- package/dist/action-plans/qualiex/hooks/useQualiexUsers.d.ts +0 -41
- package/dist/action-plans/qualiex/services/qualiexApi.d.ts +0 -75
- package/dist/action-plans/qualiex/utils/QualiexErrorInterceptor.d.ts +0 -20
- package/dist/action-plans/qualiex/utils/userPlaceUtils.d.ts +0 -16
- package/dist/action-plans/services/BaseService.d.ts +0 -51
- package/dist/action-plans/services/EmailService.d.ts +0 -110
- package/dist/action-plans/services/ErrorService.d.ts +0 -19
- package/dist/action-plans/services/QualiexEnrichmentService.d.ts +0 -53
- package/dist/action-plans/services/QualiexFieldHelpers.d.ts +0 -17
- package/dist/action-plans/setup/favicon.d.ts +0 -1
- package/dist/action-plans/setup.d.ts +0 -16
- package/dist/action-plans/sign/components/D4SignWidget.d.ts +0 -2
- package/dist/action-plans/sign/components/DocumentSigner.d.ts +0 -2
- package/dist/action-plans/sign/components/SignConfigForm.d.ts +0 -2
- package/dist/action-plans/sign/components/SignWidget.d.ts +0 -9
- package/dist/action-plans/sign/hooks/useSignConfig.d.ts +0 -6
- package/dist/action-plans/sign/index.d.ts +0 -8
- package/dist/action-plans/sign/services/signService.d.ts +0 -17
- package/dist/action-plans/sign/types.d.ts +0 -53
- package/dist/action-plans/sign/utils/loadClicksignScript.d.ts +0 -13
- package/dist/action-plans/supabase/SupabaseSingleton.d.ts +0 -34
- package/dist/action-plans/supabase/client.d.ts +0 -2
- package/dist/action-plans/supabase/legacyKeyGuard.d.ts +0 -19
- package/dist/action-plans/supabase/publicClient.d.ts +0 -2
- package/dist/action-plans/supabase/types.d.ts +0 -377
- package/dist/action-plans/team-selector/components/TeamSelector.d.ts +0 -24
- package/dist/action-plans/team-selector/index.d.ts +0 -2
- package/dist/action-plans/team-selector/types.d.ts +0 -10
- package/dist/action-plans/types/sidebar.d.ts +0 -52
- package/dist/action-plans/utils/color.d.ts +0 -26
- package/dist/action-plans/utils/formatters/currencyFormatters.d.ts +0 -1
- package/dist/action-plans/utils/formatters/dateFormatters.d.ts +0 -52
- package/dist/action-plans/utils/index.d.ts +0 -9
- package/dist/action-plans/utils/linkHelpers.d.ts +0 -9
- package/dist/action-plans/utils/load-fonts.d.ts +0 -1
- package/dist/audit-trail/action-plans/components/ActionPlanAttachmentsTab.d.ts +0 -21
- package/dist/audit-trail/action-plans/components/ActionPlanCommentsTab.d.ts +0 -21
- package/dist/audit-trail/action-plans/components/ActionPlanCostTab.d.ts +0 -15
- package/dist/audit-trail/action-plans/components/ActionPlanGeneralTab.d.ts +0 -21
- package/dist/audit-trail/action-plans/components/ActionPlanHistoryTab.d.ts +0 -16
- package/dist/audit-trail/action-plans/components/ActionPlanPage.d.ts +0 -25
- package/dist/audit-trail/action-plans/components/ActionPlanPredecessorsTab.d.ts +0 -15
- package/dist/audit-trail/action-plans/components/ActionPlanProgressDialog.d.ts +0 -16
- package/dist/audit-trail/action-plans/components/ActionPlanProgressTab.d.ts +0 -10
- package/dist/audit-trail/action-plans/components/ActionPlanStatusBadge.d.ts +0 -18
- package/dist/audit-trail/action-plans/constants.d.ts +0 -86
- package/dist/audit-trail/action-plans/hooks/useActionPlan.d.ts +0 -19
- package/dist/audit-trail/action-plans/hooks/useActionPlanProgress.d.ts +0 -20
- package/dist/audit-trail/action-plans/index.d.ts +0 -15
- package/dist/audit-trail/action-plans/types.d.ts +0 -413
- package/dist/audit-trail/action-plans/utils/formatTime.d.ts +0 -24
- package/dist/audit-trail/approval-flow/components/ApprovalSidenav.d.ts +0 -16
- package/dist/audit-trail/approval-flow/components/ApproveDialog.d.ts +0 -13
- package/dist/audit-trail/approval-flow/components/SelectApproverDialog.d.ts +0 -11
- package/dist/audit-trail/approval-flow/index.d.ts +0 -4
- package/dist/audit-trail/approval-flow/types.d.ts +0 -76
- package/dist/audit-trail/assets/index.d.ts +0 -7
- package/dist/audit-trail/audit-trail/components/AuditTrailDetails.d.ts +0 -27
- package/dist/audit-trail/audit-trail/components/AuditTrailFilter.d.ts +0 -29
- package/dist/audit-trail/audit-trail/components/AuditTrailPage.d.ts +0 -40
- package/dist/audit-trail/audit-trail/index.d.ts +0 -9
- package/dist/audit-trail/audit-trail/types.d.ts +0 -209
- package/dist/audit-trail/audit-trail/utils.d.ts +0 -54
- package/dist/audit-trail/auth/components/AliasRedirect.d.ts +0 -13
- package/dist/audit-trail/auth/components/AliasRouteGuard.d.ts +0 -20
- package/dist/audit-trail/auth/components/EditProfileDialog.d.ts +0 -13
- package/dist/audit-trail/auth/components/ProtectedRoute.d.ts +0 -11
- package/dist/audit-trail/auth/components/UserInfo.d.ts +0 -10
- package/dist/audit-trail/auth/contexts/AuthContext.d.ts +0 -89
- package/dist/audit-trail/auth/pages/CallbackPage.d.ts +0 -6
- package/dist/audit-trail/auth/pages/LoginPage.d.ts +0 -2
- package/dist/audit-trail/auth/services/AuthService.d.ts +0 -64
- package/dist/audit-trail/auth/services/SupabaseTokenService.d.ts +0 -3
- package/dist/audit-trail/auth/services/TokenManager.d.ts +0 -66
- package/dist/audit-trail/auth/services/TokenRegenerationService.d.ts +0 -14
- package/dist/audit-trail/auth/services/TokenService.d.ts +0 -48
- package/dist/audit-trail/auth/utils/ErrorInterceptor.d.ts +0 -20
- package/dist/audit-trail/components/ErrorBoundary.d.ts +0 -19
- package/dist/audit-trail/components/dashboards/dashboard-form.d.ts +0 -65
- package/dist/audit-trail/components/dashboards/dashboard-general-view.d.ts +0 -124
- package/dist/audit-trail/components/dashboards/dashboard-grid.d.ts +0 -66
- package/dist/audit-trail/components/dashboards/dashboard-list.d.ts +0 -41
- package/dist/audit-trail/components/dashboards/dashboard-panel-renderer.d.ts +0 -31
- package/dist/audit-trail/components/dashboards/dashboard-view.d.ts +0 -48
- package/dist/audit-trail/components/dashboards/helpers.d.ts +0 -86
- package/dist/audit-trail/components/dashboards/index.d.ts +0 -9
- package/dist/audit-trail/components/dashboards/panels/burndown-panel.d.ts +0 -41
- package/dist/audit-trail/components/dashboards/panels/cartesian-panel.d.ts +0 -66
- package/dist/audit-trail/components/dashboards/panels/index.d.ts +0 -14
- package/dist/audit-trail/components/dashboards/panels/list-panel.d.ts +0 -45
- package/dist/audit-trail/components/dashboards/panels/matrix-risk-panel.d.ts +0 -74
- package/dist/audit-trail/components/dashboards/panels/numeric-panel.d.ts +0 -32
- package/dist/audit-trail/components/dashboards/panels/panel-error.d.ts +0 -18
- package/dist/audit-trail/components/dashboards/panels/panel-header.d.ts +0 -27
- package/dist/audit-trail/components/dashboards/panels/panel-loader.d.ts +0 -17
- package/dist/audit-trail/components/dashboards/panels/panel-no-data.d.ts +0 -16
- package/dist/audit-trail/components/dashboards/panels/panel-unavailable.d.ts +0 -16
- package/dist/audit-trail/components/dashboards/panels/pareto-panel.d.ts +0 -30
- package/dist/audit-trail/components/dashboards/panels/performance-panel.d.ts +0 -39
- package/dist/audit-trail/components/dashboards/panels/pie-panel.d.ts +0 -29
- package/dist/audit-trail/components/dashboards/panels/text-panel.d.ts +0 -28
- package/dist/audit-trail/components/dashboards/types.d.ts +0 -755
- package/dist/audit-trail/components/layout/AppHeader.d.ts +0 -6
- package/dist/audit-trail/components/layout/AppLayout.d.ts +0 -10
- package/dist/audit-trail/components/layout/AppSidebar.d.ts +0 -10
- package/dist/audit-trail/components/layout/BodyContent.d.ts +0 -60
- package/dist/audit-trail/components/layout/SidebarActionTrigger.d.ts +0 -46
- package/dist/audit-trail/components/layout/SidebarHeader.d.ts +0 -5
- package/dist/audit-trail/components/layout/SidebarLogo.d.ts +0 -5
- package/dist/audit-trail/components/layout/sidebar-utils.d.ts +0 -12
- package/dist/audit-trail/components/modules/AccessDeniedDialog.d.ts +0 -43
- package/dist/audit-trail/components/modules/ModuleAccessGuard.d.ts +0 -42
- package/dist/audit-trail/components/modules/ModuleGrid.d.ts +0 -9
- package/dist/audit-trail/components/modules/ModuleOfferContent.d.ts +0 -20
- package/dist/audit-trail/components/modules/ModulesContent.d.ts +0 -21
- package/dist/audit-trail/components/modules/ModulesDialog.d.ts +0 -3
- package/dist/audit-trail/components/modules/ModulesFooterCards.d.ts +0 -10
- package/dist/audit-trail/components/modules/icons/ModulesCardIcons.d.ts +0 -19
- package/dist/audit-trail/components/modules/index.d.ts +0 -14
- package/dist/audit-trail/components/modules/modulesData.d.ts +0 -6
- package/dist/audit-trail/components/modules/types.d.ts +0 -41
- package/dist/audit-trail/components/ui/accordion.d.ts +0 -42
- package/dist/audit-trail/components/ui/action-button.d.ts +0 -48
- package/dist/audit-trail/components/ui/alert-dialog.d.ts +0 -102
- package/dist/audit-trail/components/ui/alert.d.ts +0 -44
- package/dist/audit-trail/components/ui/avatar.d.ts +0 -36
- package/dist/audit-trail/components/ui/badge.d.ts +0 -41
- package/dist/audit-trail/components/ui/breadcrumb.d.ts +0 -73
- package/dist/audit-trail/components/ui/button-group.d.ts +0 -24
- package/dist/audit-trail/components/ui/button.d.ts +0 -66
- package/dist/audit-trail/components/ui/calendar.d.ts +0 -24
- package/dist/audit-trail/components/ui/card.d.ts +0 -57
- package/dist/audit-trail/components/ui/chart.d.ts +0 -97
- package/dist/audit-trail/components/ui/checkbox.d.ts +0 -15
- package/dist/audit-trail/components/ui/collapsible.d.ts +0 -20
- package/dist/audit-trail/components/ui/color-picker.d.ts +0 -19
- package/dist/audit-trail/components/ui/combo-tree.d.ts +0 -103
- package/dist/audit-trail/components/ui/combobox.d.ts +0 -64
- package/dist/audit-trail/components/ui/command.d.ts +0 -89
- package/dist/audit-trail/components/ui/context-menu.d.ts +0 -122
- package/dist/audit-trail/components/ui/data-list.d.ts +0 -86
- package/dist/audit-trail/components/ui/date-picker.d.ts +0 -19
- package/dist/audit-trail/components/ui/dialog-wizard.d.ts +0 -100
- package/dist/audit-trail/components/ui/dialog.d.ts +0 -229
- package/dist/audit-trail/components/ui/disabled-menu-item.d.ts +0 -25
- package/dist/audit-trail/components/ui/drawer.d.ts +0 -94
- package/dist/audit-trail/components/ui/dropdown-menu.d.ts +0 -180
- package/dist/audit-trail/components/ui/electronic-signature-dialog.d.ts +0 -31
- package/dist/audit-trail/components/ui/empty-state.d.ts +0 -79
- package/dist/audit-trail/components/ui/export-dialog.d.ts +0 -48
- package/dist/audit-trail/components/ui/form.d.ts +0 -119
- package/dist/audit-trail/components/ui/grid.d.ts +0 -53
- package/dist/audit-trail/components/ui/hover-card.d.ts +0 -21
- package/dist/audit-trail/components/ui/icon-picker.d.ts +0 -17
- package/dist/audit-trail/components/ui/iframe-dialog.d.ts +0 -24
- package/dist/audit-trail/components/ui/input-group.d.ts +0 -113
- package/dist/audit-trail/components/ui/input.d.ts +0 -24
- package/dist/audit-trail/components/ui/label.d.ts +0 -23
- package/dist/audit-trail/components/ui/loading-state.d.ts +0 -52
- package/dist/audit-trail/components/ui/menubar.d.ts +0 -113
- package/dist/audit-trail/components/ui/multiselect-permissions.d.ts +0 -84
- package/dist/audit-trail/components/ui/navigation-menu.d.ts +0 -57
- package/dist/audit-trail/components/ui/onboarding-dialog.d.ts +0 -58
- package/dist/audit-trail/components/ui/online-editor-dialog.d.ts +0 -28
- package/dist/audit-trail/components/ui/page-breadcrumb.d.ts +0 -77
- package/dist/audit-trail/components/ui/pagination.d.ts +0 -81
- package/dist/audit-trail/components/ui/popover.d.ts +0 -57
- package/dist/audit-trail/components/ui/progress.d.ts +0 -22
- package/dist/audit-trail/components/ui/radio-group.d.ts +0 -66
- package/dist/audit-trail/components/ui/report-request-list.d.ts +0 -64
- package/dist/audit-trail/components/ui/resizable.d.ts +0 -38
- package/dist/audit-trail/components/ui/rich-text-editor.d.ts +0 -58
- package/dist/audit-trail/components/ui/scroll-area.d.ts +0 -40
- package/dist/audit-trail/components/ui/select.d.ts +0 -94
- package/dist/audit-trail/components/ui/separator.d.ts +0 -17
- package/dist/audit-trail/components/ui/sheet.d.ts +0 -108
- package/dist/audit-trail/components/ui/sidebar.d.ts +0 -269
- package/dist/audit-trail/components/ui/skeleton-variants.d.ts +0 -41
- package/dist/audit-trail/components/ui/skeleton.d.ts +0 -14
- package/dist/audit-trail/components/ui/slider.d.ts +0 -9
- package/dist/audit-trail/components/ui/sonner.d.ts +0 -8
- package/dist/audit-trail/components/ui/spinner.d.ts +0 -11
- package/dist/audit-trail/components/ui/split-button.d.ts +0 -76
- package/dist/audit-trail/components/ui/stack.d.ts +0 -17
- package/dist/audit-trail/components/ui/status-badge.d.ts +0 -52
- package/dist/audit-trail/components/ui/step-selector.d.ts +0 -46
- package/dist/audit-trail/components/ui/stimulsoft-viewer.d.ts +0 -28
- package/dist/audit-trail/components/ui/switch.d.ts +0 -25
- package/dist/audit-trail/components/ui/tab-page-layout.d.ts +0 -52
- package/dist/audit-trail/components/ui/table-resize-handle.d.ts +0 -22
- package/dist/audit-trail/components/ui/table.d.ts +0 -112
- package/dist/audit-trail/components/ui/tabs.d.ts +0 -66
- package/dist/audit-trail/components/ui/terms-of-use-dialog.d.ts +0 -102
- package/dist/audit-trail/components/ui/textarea.d.ts +0 -33
- package/dist/audit-trail/components/ui/timepicker.d.ts +0 -34
- package/dist/audit-trail/components/ui/toggle-group.d.ts +0 -37
- package/dist/audit-trail/components/ui/toggle.d.ts +0 -33
- package/dist/audit-trail/components/ui/tooltip.d.ts +0 -61
- package/dist/audit-trail/components/ui/truncated-cell.d.ts +0 -20
- package/dist/audit-trail/components/ui/typography.d.ts +0 -135
- package/dist/audit-trail/components/ui/updates-notification.d.ts +0 -47
- package/dist/audit-trail/components/ui/users-groups-selector.d.ts +0 -87
- package/dist/audit-trail/components/ui/viewer-dialog.d.ts +0 -184
- package/dist/audit-trail/config/backend.d.ts +0 -10
- package/dist/audit-trail/config/environments.d.ts +0 -27
- package/dist/audit-trail/config/index.d.ts +0 -75
- package/dist/audit-trail/contexts/LocaleContext.d.ts +0 -15
- package/dist/audit-trail/contexts/ModalStateContext.d.ts +0 -57
- package/dist/audit-trail/contexts/ModuleContext.d.ts +0 -34
- package/dist/audit-trail/contexts/NavigationContext.d.ts +0 -13
- package/dist/audit-trail/contexts/PageMetadataContext.d.ts +0 -48
- package/dist/audit-trail/crud/components/ActionMenuItems.d.ts +0 -22
- package/dist/audit-trail/crud/components/BaseForm.d.ts +0 -52
- package/dist/audit-trail/crud/components/ColumnSettingsPopover.d.ts +0 -28
- package/dist/audit-trail/crud/components/ContextMenu.d.ts +0 -21
- package/dist/audit-trail/crud/components/CrudActionBar.d.ts +0 -59
- package/dist/audit-trail/crud/components/CrudGrid.d.ts +0 -53
- package/dist/audit-trail/crud/components/CrudPagination.d.ts +0 -17
- package/dist/audit-trail/crud/components/CrudTable.d.ts +0 -66
- package/dist/audit-trail/crud/components/FilterBar.d.ts +0 -136
- package/dist/audit-trail/crud/components/GroupDropZone.d.ts +0 -16
- package/dist/audit-trail/crud/components/InlineRowActions.d.ts +0 -15
- package/dist/audit-trail/crud/components/SelectionCheckbox.d.ts +0 -9
- package/dist/audit-trail/crud/components/TableFooter.d.ts +0 -14
- package/dist/audit-trail/crud/components/TableRowActions.d.ts +0 -19
- package/dist/audit-trail/crud/createCrudPage.d.ts +0 -134
- package/dist/audit-trail/crud/createSimpleService.d.ts +0 -85
- package/dist/audit-trail/crud/generateCrudConfig.d.ts +0 -78
- package/dist/audit-trail/crud/hooks/useBaseForm.d.ts +0 -47
- package/dist/audit-trail/crud/hooks/useColumnDragReorder.d.ts +0 -19
- package/dist/audit-trail/crud/hooks/useColumnManager.d.ts +0 -85
- package/dist/audit-trail/crud/hooks/useCrud.d.ts +0 -152
- package/dist/audit-trail/crud/primitives/ActionMenu.d.ts +0 -69
- package/dist/audit-trail/crud/primitives/FilterBar.d.ts +0 -69
- package/dist/audit-trail/crud/primitives/Pagination.d.ts +0 -29
- package/dist/audit-trail/crud/primitives/Table.d.ts +0 -31
- package/dist/audit-trail/crud/primitives/TreeTable.d.ts +0 -7
- package/dist/audit-trail/crud/primitives/index.d.ts +0 -12
- package/dist/audit-trail/crud/primitives/types.d.ts +0 -199
- package/dist/audit-trail/crud/utils/routingHelpers.d.ts +0 -41
- package/dist/audit-trail/custom-form-fields/components/CustomFormFields.d.ts +0 -11
- package/dist/audit-trail/custom-form-fields/fields/FormDateField.d.ts +0 -9
- package/dist/audit-trail/custom-form-fields/fields/FormMultiSelectionField.d.ts +0 -9
- package/dist/audit-trail/custom-form-fields/fields/FormNumericField.d.ts +0 -9
- package/dist/audit-trail/custom-form-fields/fields/FormQuestionsField.d.ts +0 -9
- package/dist/audit-trail/custom-form-fields/fields/FormSingleSelectionField.d.ts +0 -9
- package/dist/audit-trail/custom-form-fields/fields/FormTextField.d.ts +0 -9
- package/dist/audit-trail/custom-form-fields/fields/FormTimeField.d.ts +0 -9
- package/dist/audit-trail/custom-form-fields/fields/FormUrlField.d.ts +0 -9
- package/dist/audit-trail/custom-form-fields/fields/ReadOnlyTextField.d.ts +0 -9
- package/dist/audit-trail/custom-form-fields/index.d.ts +0 -13
- package/dist/audit-trail/custom-form-fields/types.d.ts +0 -206
- package/dist/audit-trail/exports/action-plans.d.ts +0 -16
- package/dist/audit-trail/exports/audit-trail.d.ts +0 -1
- package/dist/audit-trail/exports/crud.d.ts +0 -31
- package/dist/audit-trail/exports/custom-form-fields.d.ts +0 -1
- package/dist/audit-trail/exports/file-upload.d.ts +0 -1
- package/dist/audit-trail/exports/integrations.d.ts +0 -15
- package/dist/audit-trail/exports/ui.d.ts +0 -100
- package/dist/audit-trail/file-upload/components/SingleFileUpload.d.ts +0 -102
- package/dist/audit-trail/file-upload/index.d.ts +0 -6
- package/dist/audit-trail/file-upload/types.d.ts +0 -26
- package/dist/audit-trail/file-upload/utils/formatBytes.d.ts +0 -6
- package/dist/audit-trail/file-upload/utils/getFileExtension.d.ts +0 -6
- package/dist/audit-trail/hooks/useActiveModules.d.ts +0 -45
- package/dist/audit-trail/hooks/useAliasFromUrl.d.ts +0 -33
- package/dist/audit-trail/hooks/useColumnResize.d.ts +0 -45
- package/dist/audit-trail/hooks/useDebounce.d.ts +0 -56
- package/dist/audit-trail/hooks/useDerivedContractedModules.d.ts +0 -8
- package/dist/audit-trail/hooks/useI18nFormatters.d.ts +0 -40
- package/dist/audit-trail/hooks/useMediaQuery.d.ts +0 -14
- package/dist/audit-trail/hooks/useModuleAccess.d.ts +0 -59
- package/dist/audit-trail/hooks/usePageTitle.d.ts +0 -10
- package/dist/audit-trail/hooks/usePermissionQuery.d.ts +0 -49
- package/dist/audit-trail/hooks/useRowResize.d.ts +0 -37
- package/dist/audit-trail/hooks/useSidebarResize.d.ts +0 -37
- package/dist/audit-trail/hooks/useUpdatesNotification.d.ts +0 -27
- package/dist/audit-trail/hooks/useWizard.d.ts +0 -40
- package/dist/audit-trail/i18n/LanguageBootstrap.d.ts +0 -14
- package/dist/audit-trail/i18n/config.d.ts +0 -13
- package/dist/audit-trail/i18n/constants.d.ts +0 -126
- package/dist/audit-trail/i18n/index.d.ts +0 -12
- package/dist/audit-trail/i18n/utils.d.ts +0 -14
- package/dist/audit-trail/integrations/clarity/clarityTracking.d.ts +0 -31
- package/dist/audit-trail/integrations/clarity/index.d.ts +0 -3
- package/dist/audit-trail/integrations/clarity/types.d.ts +0 -46
- package/dist/audit-trail/integrations/clarity/useClarity.d.ts +0 -34
- package/dist/audit-trail/integrations/index.d.ts +0 -5
- package/dist/audit-trail/leadership/components/LeadershipDialog.d.ts +0 -10
- package/dist/audit-trail/leadership/components/LeadershipForm.d.ts +0 -8
- package/dist/audit-trail/leadership/components/LeadershipPage.d.ts +0 -19
- package/dist/audit-trail/leadership/hooks/useLeadershipApi.d.ts +0 -4
- package/dist/audit-trail/leadership/hooks/useLeadershipMutations.d.ts +0 -29
- package/dist/audit-trail/leadership/index.d.ts +0 -13
- package/dist/audit-trail/leadership/types.d.ts +0 -23
- package/dist/audit-trail/leadership/utils/leadershipUtils.d.ts +0 -8
- package/dist/audit-trail/media/components/ImageEditor.d.ts +0 -22
- package/dist/audit-trail/media/components/ImageRenderer.d.ts +0 -23
- package/dist/audit-trail/media/components/VideoEditor.d.ts +0 -2
- package/dist/audit-trail/media/components/VideoRenderer.d.ts +0 -2
- package/dist/audit-trail/media/hooks/useMediaUpload.d.ts +0 -19
- package/dist/audit-trail/media/index.d.ts +0 -49
- package/dist/audit-trail/media/types.d.ts +0 -66
- package/dist/audit-trail/media/utils/imageHelpers.d.ts +0 -28
- package/dist/audit-trail/media/utils/videoHelpers.d.ts +0 -35
- package/dist/audit-trail/mind-map/components/MindMap.d.ts +0 -23
- package/dist/audit-trail/mind-map/components/MindMapConnection.d.ts +0 -12
- package/dist/audit-trail/mind-map/components/MindMapNodeView.d.ts +0 -24
- package/dist/audit-trail/mind-map/components/MindMapToolbar.d.ts +0 -26
- package/dist/audit-trail/mind-map/hooks/useMindMapKeyboard.d.ts +0 -15
- package/dist/audit-trail/mind-map/hooks/useMindMapLayout.d.ts +0 -5
- package/dist/audit-trail/mind-map/hooks/useMindMapPanZoom.d.ts +0 -21
- package/dist/audit-trail/mind-map/hooks/useMindMapState.d.ts +0 -32
- package/dist/audit-trail/mind-map/index.d.ts +0 -4
- package/dist/audit-trail/mind-map/types.d.ts +0 -91
- package/dist/audit-trail/mind-map/utils/export-image.d.ts +0 -9
- package/dist/audit-trail/mind-map/utils/layout.d.ts +0 -15
- package/dist/audit-trail/mind-map/utils/nodeOps.d.ts +0 -66
- package/dist/audit-trail/mind-map/utils/serialize.d.ts +0 -10
- package/dist/audit-trail/modules/softwaresMap.d.ts +0 -4
- package/dist/audit-trail/places/components/ManageAccessModal.d.ts +0 -11
- package/dist/audit-trail/places/components/PlaceCard.d.ts +0 -12
- package/dist/audit-trail/places/components/PlacesList.d.ts +0 -12
- package/dist/audit-trail/places/index.d.ts +0 -8
- package/dist/audit-trail/places/services/PlaceService.d.ts +0 -9
- package/dist/audit-trail/places/types.d.ts +0 -10
- package/dist/audit-trail/providers/CoreProviders.d.ts +0 -107
- package/dist/audit-trail/providers/index.d.ts +0 -2
- package/dist/audit-trail/qualiex/components/QualiexUserField.d.ts +0 -133
- package/dist/audit-trail/qualiex/hooks/useQualiexUsers.d.ts +0 -41
- package/dist/audit-trail/qualiex/services/qualiexApi.d.ts +0 -75
- package/dist/audit-trail/qualiex/utils/QualiexErrorInterceptor.d.ts +0 -20
- package/dist/audit-trail/qualiex/utils/userPlaceUtils.d.ts +0 -16
- package/dist/audit-trail/services/BaseService.d.ts +0 -51
- package/dist/audit-trail/services/EmailService.d.ts +0 -110
- package/dist/audit-trail/services/ErrorService.d.ts +0 -19
- package/dist/audit-trail/services/QualiexEnrichmentService.d.ts +0 -53
- package/dist/audit-trail/services/QualiexFieldHelpers.d.ts +0 -17
- package/dist/audit-trail/setup/favicon.d.ts +0 -1
- package/dist/audit-trail/setup.d.ts +0 -16
- package/dist/audit-trail/sign/components/D4SignWidget.d.ts +0 -2
- package/dist/audit-trail/sign/components/DocumentSigner.d.ts +0 -2
- package/dist/audit-trail/sign/components/SignConfigForm.d.ts +0 -2
- package/dist/audit-trail/sign/components/SignWidget.d.ts +0 -9
- package/dist/audit-trail/sign/hooks/useSignConfig.d.ts +0 -6
- package/dist/audit-trail/sign/index.d.ts +0 -8
- package/dist/audit-trail/sign/services/signService.d.ts +0 -17
- package/dist/audit-trail/sign/types.d.ts +0 -53
- package/dist/audit-trail/sign/utils/loadClicksignScript.d.ts +0 -13
- package/dist/audit-trail/supabase/SupabaseSingleton.d.ts +0 -34
- package/dist/audit-trail/supabase/client.d.ts +0 -2
- package/dist/audit-trail/supabase/legacyKeyGuard.d.ts +0 -19
- package/dist/audit-trail/supabase/publicClient.d.ts +0 -2
- package/dist/audit-trail/supabase/types.d.ts +0 -377
- package/dist/audit-trail/team-selector/components/TeamSelector.d.ts +0 -24
- package/dist/audit-trail/team-selector/index.d.ts +0 -2
- package/dist/audit-trail/team-selector/types.d.ts +0 -10
- package/dist/audit-trail/types/sidebar.d.ts +0 -52
- package/dist/audit-trail/utils/color.d.ts +0 -26
- package/dist/audit-trail/utils/formatters/currencyFormatters.d.ts +0 -1
- package/dist/audit-trail/utils/formatters/dateFormatters.d.ts +0 -52
- package/dist/audit-trail/utils/index.d.ts +0 -9
- package/dist/audit-trail/utils/linkHelpers.d.ts +0 -9
- package/dist/audit-trail/utils/load-fonts.d.ts +0 -1
- package/dist/leadership/action-plans/components/ActionPlanAttachmentsTab.d.ts +0 -21
- package/dist/leadership/action-plans/components/ActionPlanCommentsTab.d.ts +0 -21
- package/dist/leadership/action-plans/components/ActionPlanCostTab.d.ts +0 -15
- package/dist/leadership/action-plans/components/ActionPlanGeneralTab.d.ts +0 -21
- package/dist/leadership/action-plans/components/ActionPlanHistoryTab.d.ts +0 -16
- package/dist/leadership/action-plans/components/ActionPlanPage.d.ts +0 -25
- package/dist/leadership/action-plans/components/ActionPlanPredecessorsTab.d.ts +0 -15
- package/dist/leadership/action-plans/components/ActionPlanProgressDialog.d.ts +0 -16
- package/dist/leadership/action-plans/components/ActionPlanProgressTab.d.ts +0 -10
- package/dist/leadership/action-plans/components/ActionPlanStatusBadge.d.ts +0 -18
- package/dist/leadership/action-plans/constants.d.ts +0 -86
- package/dist/leadership/action-plans/hooks/useActionPlan.d.ts +0 -19
- package/dist/leadership/action-plans/hooks/useActionPlanProgress.d.ts +0 -20
- package/dist/leadership/action-plans/index.d.ts +0 -15
- package/dist/leadership/action-plans/types.d.ts +0 -413
- package/dist/leadership/action-plans/utils/formatTime.d.ts +0 -24
- package/dist/leadership/approval-flow/components/ApprovalSidenav.d.ts +0 -16
- package/dist/leadership/approval-flow/components/ApproveDialog.d.ts +0 -13
- package/dist/leadership/approval-flow/components/SelectApproverDialog.d.ts +0 -11
- package/dist/leadership/approval-flow/index.d.ts +0 -4
- package/dist/leadership/approval-flow/types.d.ts +0 -76
- package/dist/leadership/assets/index.d.ts +0 -7
- package/dist/leadership/audit-trail/components/AuditTrailDetails.d.ts +0 -27
- package/dist/leadership/audit-trail/components/AuditTrailFilter.d.ts +0 -29
- package/dist/leadership/audit-trail/components/AuditTrailPage.d.ts +0 -40
- package/dist/leadership/audit-trail/index.d.ts +0 -9
- package/dist/leadership/audit-trail/types.d.ts +0 -209
- package/dist/leadership/audit-trail/utils.d.ts +0 -54
- package/dist/leadership/auth/components/AliasRedirect.d.ts +0 -13
- package/dist/leadership/auth/components/AliasRouteGuard.d.ts +0 -20
- package/dist/leadership/auth/components/EditProfileDialog.d.ts +0 -13
- package/dist/leadership/auth/components/ProtectedRoute.d.ts +0 -11
- package/dist/leadership/auth/components/UserInfo.d.ts +0 -10
- package/dist/leadership/auth/contexts/AuthContext.d.ts +0 -89
- package/dist/leadership/auth/pages/CallbackPage.d.ts +0 -6
- package/dist/leadership/auth/pages/LoginPage.d.ts +0 -2
- package/dist/leadership/auth/services/AuthService.d.ts +0 -64
- package/dist/leadership/auth/services/SupabaseTokenService.d.ts +0 -3
- package/dist/leadership/auth/services/TokenManager.d.ts +0 -66
- package/dist/leadership/auth/services/TokenRegenerationService.d.ts +0 -14
- package/dist/leadership/auth/services/TokenService.d.ts +0 -48
- package/dist/leadership/auth/utils/ErrorInterceptor.d.ts +0 -20
- package/dist/leadership/components/ErrorBoundary.d.ts +0 -19
- package/dist/leadership/components/dashboards/dashboard-form.d.ts +0 -65
- package/dist/leadership/components/dashboards/dashboard-general-view.d.ts +0 -124
- package/dist/leadership/components/dashboards/dashboard-grid.d.ts +0 -66
- package/dist/leadership/components/dashboards/dashboard-list.d.ts +0 -41
- package/dist/leadership/components/dashboards/dashboard-panel-renderer.d.ts +0 -31
- package/dist/leadership/components/dashboards/dashboard-view.d.ts +0 -48
- package/dist/leadership/components/dashboards/helpers.d.ts +0 -86
- package/dist/leadership/components/dashboards/index.d.ts +0 -9
- package/dist/leadership/components/dashboards/panels/burndown-panel.d.ts +0 -41
- package/dist/leadership/components/dashboards/panels/cartesian-panel.d.ts +0 -66
- package/dist/leadership/components/dashboards/panels/index.d.ts +0 -14
- package/dist/leadership/components/dashboards/panels/list-panel.d.ts +0 -45
- package/dist/leadership/components/dashboards/panels/matrix-risk-panel.d.ts +0 -74
- package/dist/leadership/components/dashboards/panels/numeric-panel.d.ts +0 -32
- package/dist/leadership/components/dashboards/panels/panel-error.d.ts +0 -18
- package/dist/leadership/components/dashboards/panels/panel-header.d.ts +0 -27
- package/dist/leadership/components/dashboards/panels/panel-loader.d.ts +0 -17
- package/dist/leadership/components/dashboards/panels/panel-no-data.d.ts +0 -16
- package/dist/leadership/components/dashboards/panels/panel-unavailable.d.ts +0 -16
- package/dist/leadership/components/dashboards/panels/pareto-panel.d.ts +0 -30
- package/dist/leadership/components/dashboards/panels/performance-panel.d.ts +0 -39
- package/dist/leadership/components/dashboards/panels/pie-panel.d.ts +0 -29
- package/dist/leadership/components/dashboards/panels/text-panel.d.ts +0 -28
- package/dist/leadership/components/dashboards/types.d.ts +0 -755
- package/dist/leadership/components/layout/AppHeader.d.ts +0 -6
- package/dist/leadership/components/layout/AppLayout.d.ts +0 -10
- package/dist/leadership/components/layout/AppSidebar.d.ts +0 -10
- package/dist/leadership/components/layout/BodyContent.d.ts +0 -60
- package/dist/leadership/components/layout/SidebarActionTrigger.d.ts +0 -46
- package/dist/leadership/components/layout/SidebarHeader.d.ts +0 -5
- package/dist/leadership/components/layout/SidebarLogo.d.ts +0 -5
- package/dist/leadership/components/layout/sidebar-utils.d.ts +0 -12
- package/dist/leadership/components/modules/AccessDeniedDialog.d.ts +0 -43
- package/dist/leadership/components/modules/ModuleAccessGuard.d.ts +0 -42
- package/dist/leadership/components/modules/ModuleGrid.d.ts +0 -9
- package/dist/leadership/components/modules/ModuleOfferContent.d.ts +0 -20
- package/dist/leadership/components/modules/ModulesContent.d.ts +0 -21
- package/dist/leadership/components/modules/ModulesDialog.d.ts +0 -3
- package/dist/leadership/components/modules/ModulesFooterCards.d.ts +0 -10
- package/dist/leadership/components/modules/icons/ModulesCardIcons.d.ts +0 -19
- package/dist/leadership/components/modules/index.d.ts +0 -14
- package/dist/leadership/components/modules/modulesData.d.ts +0 -6
- package/dist/leadership/components/modules/types.d.ts +0 -41
- package/dist/leadership/components/ui/accordion.d.ts +0 -42
- package/dist/leadership/components/ui/action-button.d.ts +0 -48
- package/dist/leadership/components/ui/alert-dialog.d.ts +0 -102
- package/dist/leadership/components/ui/alert.d.ts +0 -44
- package/dist/leadership/components/ui/avatar.d.ts +0 -36
- package/dist/leadership/components/ui/badge.d.ts +0 -41
- package/dist/leadership/components/ui/breadcrumb.d.ts +0 -73
- package/dist/leadership/components/ui/button-group.d.ts +0 -24
- package/dist/leadership/components/ui/button.d.ts +0 -66
- package/dist/leadership/components/ui/calendar.d.ts +0 -24
- package/dist/leadership/components/ui/card.d.ts +0 -57
- package/dist/leadership/components/ui/chart.d.ts +0 -97
- package/dist/leadership/components/ui/checkbox.d.ts +0 -15
- package/dist/leadership/components/ui/collapsible.d.ts +0 -20
- package/dist/leadership/components/ui/color-picker.d.ts +0 -19
- package/dist/leadership/components/ui/combo-tree.d.ts +0 -103
- package/dist/leadership/components/ui/combobox.d.ts +0 -64
- package/dist/leadership/components/ui/command.d.ts +0 -89
- package/dist/leadership/components/ui/context-menu.d.ts +0 -122
- package/dist/leadership/components/ui/data-list.d.ts +0 -86
- package/dist/leadership/components/ui/date-picker.d.ts +0 -19
- package/dist/leadership/components/ui/dialog-wizard.d.ts +0 -100
- package/dist/leadership/components/ui/dialog.d.ts +0 -229
- package/dist/leadership/components/ui/disabled-menu-item.d.ts +0 -25
- package/dist/leadership/components/ui/drawer.d.ts +0 -94
- package/dist/leadership/components/ui/dropdown-menu.d.ts +0 -180
- package/dist/leadership/components/ui/electronic-signature-dialog.d.ts +0 -31
- package/dist/leadership/components/ui/empty-state.d.ts +0 -79
- package/dist/leadership/components/ui/export-dialog.d.ts +0 -48
- package/dist/leadership/components/ui/form.d.ts +0 -119
- package/dist/leadership/components/ui/grid.d.ts +0 -53
- package/dist/leadership/components/ui/hover-card.d.ts +0 -21
- package/dist/leadership/components/ui/icon-picker.d.ts +0 -17
- package/dist/leadership/components/ui/iframe-dialog.d.ts +0 -24
- package/dist/leadership/components/ui/input-group.d.ts +0 -113
- package/dist/leadership/components/ui/input.d.ts +0 -24
- package/dist/leadership/components/ui/label.d.ts +0 -23
- package/dist/leadership/components/ui/loading-state.d.ts +0 -52
- package/dist/leadership/components/ui/menubar.d.ts +0 -113
- package/dist/leadership/components/ui/multiselect-permissions.d.ts +0 -84
- package/dist/leadership/components/ui/navigation-menu.d.ts +0 -57
- package/dist/leadership/components/ui/onboarding-dialog.d.ts +0 -58
- package/dist/leadership/components/ui/online-editor-dialog.d.ts +0 -28
- package/dist/leadership/components/ui/page-breadcrumb.d.ts +0 -77
- package/dist/leadership/components/ui/pagination.d.ts +0 -81
- package/dist/leadership/components/ui/popover.d.ts +0 -57
- package/dist/leadership/components/ui/progress.d.ts +0 -22
- package/dist/leadership/components/ui/radio-group.d.ts +0 -66
- package/dist/leadership/components/ui/report-request-list.d.ts +0 -64
- package/dist/leadership/components/ui/resizable.d.ts +0 -38
- package/dist/leadership/components/ui/rich-text-editor.d.ts +0 -58
- package/dist/leadership/components/ui/scroll-area.d.ts +0 -40
- package/dist/leadership/components/ui/select.d.ts +0 -94
- package/dist/leadership/components/ui/separator.d.ts +0 -17
- package/dist/leadership/components/ui/sheet.d.ts +0 -108
- package/dist/leadership/components/ui/sidebar.d.ts +0 -269
- package/dist/leadership/components/ui/skeleton-variants.d.ts +0 -41
- package/dist/leadership/components/ui/skeleton.d.ts +0 -14
- package/dist/leadership/components/ui/slider.d.ts +0 -9
- package/dist/leadership/components/ui/sonner.d.ts +0 -8
- package/dist/leadership/components/ui/spinner.d.ts +0 -11
- package/dist/leadership/components/ui/split-button.d.ts +0 -76
- package/dist/leadership/components/ui/stack.d.ts +0 -17
- package/dist/leadership/components/ui/status-badge.d.ts +0 -52
- package/dist/leadership/components/ui/step-selector.d.ts +0 -46
- package/dist/leadership/components/ui/stimulsoft-viewer.d.ts +0 -28
- package/dist/leadership/components/ui/switch.d.ts +0 -25
- package/dist/leadership/components/ui/tab-page-layout.d.ts +0 -52
- package/dist/leadership/components/ui/table-resize-handle.d.ts +0 -22
- package/dist/leadership/components/ui/table.d.ts +0 -112
- package/dist/leadership/components/ui/tabs.d.ts +0 -66
- package/dist/leadership/components/ui/terms-of-use-dialog.d.ts +0 -102
- package/dist/leadership/components/ui/textarea.d.ts +0 -33
- package/dist/leadership/components/ui/timepicker.d.ts +0 -34
- package/dist/leadership/components/ui/toggle-group.d.ts +0 -37
- package/dist/leadership/components/ui/toggle.d.ts +0 -33
- package/dist/leadership/components/ui/tooltip.d.ts +0 -61
- package/dist/leadership/components/ui/truncated-cell.d.ts +0 -20
- package/dist/leadership/components/ui/typography.d.ts +0 -135
- package/dist/leadership/components/ui/updates-notification.d.ts +0 -47
- package/dist/leadership/components/ui/users-groups-selector.d.ts +0 -87
- package/dist/leadership/components/ui/viewer-dialog.d.ts +0 -184
- package/dist/leadership/config/backend.d.ts +0 -10
- package/dist/leadership/config/environments.d.ts +0 -27
- package/dist/leadership/config/index.d.ts +0 -75
- package/dist/leadership/contexts/LocaleContext.d.ts +0 -15
- package/dist/leadership/contexts/ModalStateContext.d.ts +0 -57
- package/dist/leadership/contexts/ModuleContext.d.ts +0 -34
- package/dist/leadership/contexts/NavigationContext.d.ts +0 -13
- package/dist/leadership/contexts/PageMetadataContext.d.ts +0 -48
- package/dist/leadership/crud/components/ActionMenuItems.d.ts +0 -22
- package/dist/leadership/crud/components/BaseForm.d.ts +0 -52
- package/dist/leadership/crud/components/ColumnSettingsPopover.d.ts +0 -28
- package/dist/leadership/crud/components/ContextMenu.d.ts +0 -21
- package/dist/leadership/crud/components/CrudActionBar.d.ts +0 -59
- package/dist/leadership/crud/components/CrudGrid.d.ts +0 -53
- package/dist/leadership/crud/components/CrudPagination.d.ts +0 -17
- package/dist/leadership/crud/components/CrudTable.d.ts +0 -66
- package/dist/leadership/crud/components/FilterBar.d.ts +0 -136
- package/dist/leadership/crud/components/GroupDropZone.d.ts +0 -16
- package/dist/leadership/crud/components/InlineRowActions.d.ts +0 -15
- package/dist/leadership/crud/components/SelectionCheckbox.d.ts +0 -9
- package/dist/leadership/crud/components/TableFooter.d.ts +0 -14
- package/dist/leadership/crud/components/TableRowActions.d.ts +0 -19
- package/dist/leadership/crud/createCrudPage.d.ts +0 -134
- package/dist/leadership/crud/createSimpleService.d.ts +0 -85
- package/dist/leadership/crud/generateCrudConfig.d.ts +0 -78
- package/dist/leadership/crud/hooks/useBaseForm.d.ts +0 -47
- package/dist/leadership/crud/hooks/useColumnDragReorder.d.ts +0 -19
- package/dist/leadership/crud/hooks/useColumnManager.d.ts +0 -85
- package/dist/leadership/crud/hooks/useCrud.d.ts +0 -152
- package/dist/leadership/crud/primitives/ActionMenu.d.ts +0 -69
- package/dist/leadership/crud/primitives/FilterBar.d.ts +0 -69
- package/dist/leadership/crud/primitives/Pagination.d.ts +0 -29
- package/dist/leadership/crud/primitives/Table.d.ts +0 -31
- package/dist/leadership/crud/primitives/TreeTable.d.ts +0 -7
- package/dist/leadership/crud/primitives/index.d.ts +0 -12
- package/dist/leadership/crud/primitives/types.d.ts +0 -199
- package/dist/leadership/crud/utils/routingHelpers.d.ts +0 -41
- package/dist/leadership/custom-form-fields/components/CustomFormFields.d.ts +0 -11
- package/dist/leadership/custom-form-fields/fields/FormDateField.d.ts +0 -9
- package/dist/leadership/custom-form-fields/fields/FormMultiSelectionField.d.ts +0 -9
- package/dist/leadership/custom-form-fields/fields/FormNumericField.d.ts +0 -9
- package/dist/leadership/custom-form-fields/fields/FormQuestionsField.d.ts +0 -9
- package/dist/leadership/custom-form-fields/fields/FormSingleSelectionField.d.ts +0 -9
- package/dist/leadership/custom-form-fields/fields/FormTextField.d.ts +0 -9
- package/dist/leadership/custom-form-fields/fields/FormTimeField.d.ts +0 -9
- package/dist/leadership/custom-form-fields/fields/FormUrlField.d.ts +0 -9
- package/dist/leadership/custom-form-fields/fields/ReadOnlyTextField.d.ts +0 -9
- package/dist/leadership/custom-form-fields/index.d.ts +0 -13
- package/dist/leadership/custom-form-fields/types.d.ts +0 -206
- package/dist/leadership/exports/action-plans.d.ts +0 -16
- package/dist/leadership/exports/audit-trail.d.ts +0 -1
- package/dist/leadership/exports/crud.d.ts +0 -31
- package/dist/leadership/exports/custom-form-fields.d.ts +0 -1
- package/dist/leadership/exports/file-upload.d.ts +0 -1
- package/dist/leadership/exports/integrations.d.ts +0 -15
- package/dist/leadership/exports/ui.d.ts +0 -100
- package/dist/leadership/file-upload/components/SingleFileUpload.d.ts +0 -102
- package/dist/leadership/file-upload/index.d.ts +0 -6
- package/dist/leadership/file-upload/types.d.ts +0 -26
- package/dist/leadership/file-upload/utils/formatBytes.d.ts +0 -6
- package/dist/leadership/file-upload/utils/getFileExtension.d.ts +0 -6
- package/dist/leadership/hooks/useActiveModules.d.ts +0 -45
- package/dist/leadership/hooks/useAliasFromUrl.d.ts +0 -33
- package/dist/leadership/hooks/useColumnResize.d.ts +0 -45
- package/dist/leadership/hooks/useDebounce.d.ts +0 -56
- package/dist/leadership/hooks/useDerivedContractedModules.d.ts +0 -8
- package/dist/leadership/hooks/useI18nFormatters.d.ts +0 -40
- package/dist/leadership/hooks/useMediaQuery.d.ts +0 -14
- package/dist/leadership/hooks/useModuleAccess.d.ts +0 -59
- package/dist/leadership/hooks/usePageTitle.d.ts +0 -10
- package/dist/leadership/hooks/usePermissionQuery.d.ts +0 -49
- package/dist/leadership/hooks/useRowResize.d.ts +0 -37
- package/dist/leadership/hooks/useSidebarResize.d.ts +0 -37
- package/dist/leadership/hooks/useUpdatesNotification.d.ts +0 -27
- package/dist/leadership/hooks/useWizard.d.ts +0 -40
- package/dist/leadership/i18n/LanguageBootstrap.d.ts +0 -14
- package/dist/leadership/i18n/config.d.ts +0 -13
- package/dist/leadership/i18n/constants.d.ts +0 -126
- package/dist/leadership/i18n/index.d.ts +0 -12
- package/dist/leadership/i18n/utils.d.ts +0 -14
- package/dist/leadership/integrations/clarity/clarityTracking.d.ts +0 -31
- package/dist/leadership/integrations/clarity/index.d.ts +0 -3
- package/dist/leadership/integrations/clarity/types.d.ts +0 -46
- package/dist/leadership/integrations/clarity/useClarity.d.ts +0 -34
- package/dist/leadership/integrations/index.d.ts +0 -5
- package/dist/leadership/leadership/components/LeadershipDialog.d.ts +0 -10
- package/dist/leadership/leadership/components/LeadershipForm.d.ts +0 -8
- package/dist/leadership/leadership/components/LeadershipPage.d.ts +0 -19
- package/dist/leadership/leadership/hooks/useLeadershipApi.d.ts +0 -4
- package/dist/leadership/leadership/hooks/useLeadershipMutations.d.ts +0 -29
- package/dist/leadership/leadership/index.d.ts +0 -13
- package/dist/leadership/leadership/types.d.ts +0 -23
- package/dist/leadership/leadership/utils/leadershipUtils.d.ts +0 -8
- package/dist/leadership/media/components/ImageEditor.d.ts +0 -22
- package/dist/leadership/media/components/ImageRenderer.d.ts +0 -23
- package/dist/leadership/media/components/VideoEditor.d.ts +0 -2
- package/dist/leadership/media/components/VideoRenderer.d.ts +0 -2
- package/dist/leadership/media/hooks/useMediaUpload.d.ts +0 -19
- package/dist/leadership/media/index.d.ts +0 -49
- package/dist/leadership/media/types.d.ts +0 -66
- package/dist/leadership/media/utils/imageHelpers.d.ts +0 -28
- package/dist/leadership/media/utils/videoHelpers.d.ts +0 -35
- package/dist/leadership/mind-map/components/MindMap.d.ts +0 -23
- package/dist/leadership/mind-map/components/MindMapConnection.d.ts +0 -12
- package/dist/leadership/mind-map/components/MindMapNodeView.d.ts +0 -24
- package/dist/leadership/mind-map/components/MindMapToolbar.d.ts +0 -26
- package/dist/leadership/mind-map/hooks/useMindMapKeyboard.d.ts +0 -15
- package/dist/leadership/mind-map/hooks/useMindMapLayout.d.ts +0 -5
- package/dist/leadership/mind-map/hooks/useMindMapPanZoom.d.ts +0 -21
- package/dist/leadership/mind-map/hooks/useMindMapState.d.ts +0 -32
- package/dist/leadership/mind-map/index.d.ts +0 -4
- package/dist/leadership/mind-map/types.d.ts +0 -91
- package/dist/leadership/mind-map/utils/export-image.d.ts +0 -9
- package/dist/leadership/mind-map/utils/layout.d.ts +0 -15
- package/dist/leadership/mind-map/utils/nodeOps.d.ts +0 -66
- package/dist/leadership/mind-map/utils/serialize.d.ts +0 -10
- package/dist/leadership/modules/softwaresMap.d.ts +0 -4
- package/dist/leadership/places/components/ManageAccessModal.d.ts +0 -11
- package/dist/leadership/places/components/PlaceCard.d.ts +0 -12
- package/dist/leadership/places/components/PlacesList.d.ts +0 -12
- package/dist/leadership/places/index.d.ts +0 -8
- package/dist/leadership/places/services/PlaceService.d.ts +0 -9
- package/dist/leadership/places/types.d.ts +0 -10
- package/dist/leadership/providers/CoreProviders.d.ts +0 -107
- package/dist/leadership/providers/index.d.ts +0 -2
- package/dist/leadership/qualiex/components/QualiexUserField.d.ts +0 -133
- package/dist/leadership/qualiex/hooks/useQualiexUsers.d.ts +0 -41
- package/dist/leadership/qualiex/services/qualiexApi.d.ts +0 -75
- package/dist/leadership/qualiex/utils/QualiexErrorInterceptor.d.ts +0 -20
- package/dist/leadership/qualiex/utils/userPlaceUtils.d.ts +0 -16
- package/dist/leadership/services/BaseService.d.ts +0 -51
- package/dist/leadership/services/EmailService.d.ts +0 -110
- package/dist/leadership/services/ErrorService.d.ts +0 -19
- package/dist/leadership/services/QualiexEnrichmentService.d.ts +0 -53
- package/dist/leadership/services/QualiexFieldHelpers.d.ts +0 -17
- package/dist/leadership/setup/favicon.d.ts +0 -1
- package/dist/leadership/setup.d.ts +0 -16
- package/dist/leadership/sign/components/D4SignWidget.d.ts +0 -2
- package/dist/leadership/sign/components/DocumentSigner.d.ts +0 -2
- package/dist/leadership/sign/components/SignConfigForm.d.ts +0 -2
- package/dist/leadership/sign/components/SignWidget.d.ts +0 -9
- package/dist/leadership/sign/hooks/useSignConfig.d.ts +0 -6
- package/dist/leadership/sign/index.d.ts +0 -8
- package/dist/leadership/sign/services/signService.d.ts +0 -17
- package/dist/leadership/sign/types.d.ts +0 -53
- package/dist/leadership/sign/utils/loadClicksignScript.d.ts +0 -13
- package/dist/leadership/supabase/SupabaseSingleton.d.ts +0 -34
- package/dist/leadership/supabase/client.d.ts +0 -2
- package/dist/leadership/supabase/legacyKeyGuard.d.ts +0 -19
- package/dist/leadership/supabase/publicClient.d.ts +0 -2
- package/dist/leadership/supabase/types.d.ts +0 -377
- package/dist/leadership/team-selector/components/TeamSelector.d.ts +0 -24
- package/dist/leadership/team-selector/index.d.ts +0 -2
- package/dist/leadership/team-selector/types.d.ts +0 -10
- package/dist/leadership/types/sidebar.d.ts +0 -52
- package/dist/leadership/utils/color.d.ts +0 -26
- package/dist/leadership/utils/formatters/currencyFormatters.d.ts +0 -1
- package/dist/leadership/utils/formatters/dateFormatters.d.ts +0 -52
- package/dist/leadership/utils/index.d.ts +0 -9
- package/dist/leadership/utils/linkHelpers.d.ts +0 -9
- package/dist/leadership/utils/load-fonts.d.ts +0 -1
- package/dist/places/action-plans/components/ActionPlanAttachmentsTab.d.ts +0 -21
- package/dist/places/action-plans/components/ActionPlanCommentsTab.d.ts +0 -21
- package/dist/places/action-plans/components/ActionPlanCostTab.d.ts +0 -15
- package/dist/places/action-plans/components/ActionPlanGeneralTab.d.ts +0 -21
- package/dist/places/action-plans/components/ActionPlanHistoryTab.d.ts +0 -16
- package/dist/places/action-plans/components/ActionPlanPage.d.ts +0 -25
- package/dist/places/action-plans/components/ActionPlanPredecessorsTab.d.ts +0 -15
- package/dist/places/action-plans/components/ActionPlanProgressDialog.d.ts +0 -16
- package/dist/places/action-plans/components/ActionPlanProgressTab.d.ts +0 -10
- package/dist/places/action-plans/components/ActionPlanStatusBadge.d.ts +0 -18
- package/dist/places/action-plans/constants.d.ts +0 -86
- package/dist/places/action-plans/hooks/useActionPlan.d.ts +0 -19
- package/dist/places/action-plans/hooks/useActionPlanProgress.d.ts +0 -20
- package/dist/places/action-plans/index.d.ts +0 -15
- package/dist/places/action-plans/types.d.ts +0 -413
- package/dist/places/action-plans/utils/formatTime.d.ts +0 -24
- package/dist/places/approval-flow/components/ApprovalSidenav.d.ts +0 -16
- package/dist/places/approval-flow/components/ApproveDialog.d.ts +0 -13
- package/dist/places/approval-flow/components/SelectApproverDialog.d.ts +0 -11
- package/dist/places/approval-flow/index.d.ts +0 -4
- package/dist/places/approval-flow/types.d.ts +0 -76
- package/dist/places/assets/index.d.ts +0 -7
- package/dist/places/audit-trail/components/AuditTrailDetails.d.ts +0 -27
- package/dist/places/audit-trail/components/AuditTrailFilter.d.ts +0 -29
- package/dist/places/audit-trail/components/AuditTrailPage.d.ts +0 -40
- package/dist/places/audit-trail/index.d.ts +0 -9
- package/dist/places/audit-trail/types.d.ts +0 -209
- package/dist/places/audit-trail/utils.d.ts +0 -54
- package/dist/places/auth/components/AliasRedirect.d.ts +0 -13
- package/dist/places/auth/components/AliasRouteGuard.d.ts +0 -20
- package/dist/places/auth/components/EditProfileDialog.d.ts +0 -13
- package/dist/places/auth/components/ProtectedRoute.d.ts +0 -11
- package/dist/places/auth/components/UserInfo.d.ts +0 -10
- package/dist/places/auth/contexts/AuthContext.d.ts +0 -89
- package/dist/places/auth/pages/CallbackPage.d.ts +0 -6
- package/dist/places/auth/pages/LoginPage.d.ts +0 -2
- package/dist/places/auth/services/AuthService.d.ts +0 -64
- package/dist/places/auth/services/SupabaseTokenService.d.ts +0 -3
- package/dist/places/auth/services/TokenManager.d.ts +0 -66
- package/dist/places/auth/services/TokenRegenerationService.d.ts +0 -14
- package/dist/places/auth/services/TokenService.d.ts +0 -48
- package/dist/places/auth/utils/ErrorInterceptor.d.ts +0 -20
- package/dist/places/components/ErrorBoundary.d.ts +0 -19
- package/dist/places/components/dashboards/dashboard-form.d.ts +0 -65
- package/dist/places/components/dashboards/dashboard-general-view.d.ts +0 -124
- package/dist/places/components/dashboards/dashboard-grid.d.ts +0 -66
- package/dist/places/components/dashboards/dashboard-list.d.ts +0 -41
- package/dist/places/components/dashboards/dashboard-panel-renderer.d.ts +0 -31
- package/dist/places/components/dashboards/dashboard-view.d.ts +0 -48
- package/dist/places/components/dashboards/helpers.d.ts +0 -86
- package/dist/places/components/dashboards/index.d.ts +0 -9
- package/dist/places/components/dashboards/panels/burndown-panel.d.ts +0 -41
- package/dist/places/components/dashboards/panels/cartesian-panel.d.ts +0 -66
- package/dist/places/components/dashboards/panels/index.d.ts +0 -14
- package/dist/places/components/dashboards/panels/list-panel.d.ts +0 -45
- package/dist/places/components/dashboards/panels/matrix-risk-panel.d.ts +0 -74
- package/dist/places/components/dashboards/panels/numeric-panel.d.ts +0 -32
- package/dist/places/components/dashboards/panels/panel-error.d.ts +0 -18
- package/dist/places/components/dashboards/panels/panel-header.d.ts +0 -27
- package/dist/places/components/dashboards/panels/panel-loader.d.ts +0 -17
- package/dist/places/components/dashboards/panels/panel-no-data.d.ts +0 -16
- package/dist/places/components/dashboards/panels/panel-unavailable.d.ts +0 -16
- package/dist/places/components/dashboards/panels/pareto-panel.d.ts +0 -30
- package/dist/places/components/dashboards/panels/performance-panel.d.ts +0 -39
- package/dist/places/components/dashboards/panels/pie-panel.d.ts +0 -29
- package/dist/places/components/dashboards/panels/text-panel.d.ts +0 -28
- package/dist/places/components/dashboards/types.d.ts +0 -755
- package/dist/places/components/layout/AppHeader.d.ts +0 -6
- package/dist/places/components/layout/AppLayout.d.ts +0 -10
- package/dist/places/components/layout/AppSidebar.d.ts +0 -10
- package/dist/places/components/layout/BodyContent.d.ts +0 -60
- package/dist/places/components/layout/SidebarActionTrigger.d.ts +0 -46
- package/dist/places/components/layout/SidebarHeader.d.ts +0 -5
- package/dist/places/components/layout/SidebarLogo.d.ts +0 -5
- package/dist/places/components/layout/sidebar-utils.d.ts +0 -12
- package/dist/places/components/modules/AccessDeniedDialog.d.ts +0 -43
- package/dist/places/components/modules/ModuleAccessGuard.d.ts +0 -42
- package/dist/places/components/modules/ModuleGrid.d.ts +0 -9
- package/dist/places/components/modules/ModuleOfferContent.d.ts +0 -20
- package/dist/places/components/modules/ModulesContent.d.ts +0 -21
- package/dist/places/components/modules/ModulesDialog.d.ts +0 -3
- package/dist/places/components/modules/ModulesFooterCards.d.ts +0 -10
- package/dist/places/components/modules/icons/ModulesCardIcons.d.ts +0 -19
- package/dist/places/components/modules/index.d.ts +0 -14
- package/dist/places/components/modules/modulesData.d.ts +0 -6
- package/dist/places/components/modules/types.d.ts +0 -41
- package/dist/places/components/ui/accordion.d.ts +0 -42
- package/dist/places/components/ui/action-button.d.ts +0 -48
- package/dist/places/components/ui/alert-dialog.d.ts +0 -102
- package/dist/places/components/ui/alert.d.ts +0 -44
- package/dist/places/components/ui/avatar.d.ts +0 -36
- package/dist/places/components/ui/badge.d.ts +0 -41
- package/dist/places/components/ui/breadcrumb.d.ts +0 -73
- package/dist/places/components/ui/button-group.d.ts +0 -24
- package/dist/places/components/ui/button.d.ts +0 -66
- package/dist/places/components/ui/calendar.d.ts +0 -24
- package/dist/places/components/ui/card.d.ts +0 -57
- package/dist/places/components/ui/chart.d.ts +0 -97
- package/dist/places/components/ui/checkbox.d.ts +0 -15
- package/dist/places/components/ui/collapsible.d.ts +0 -20
- package/dist/places/components/ui/color-picker.d.ts +0 -19
- package/dist/places/components/ui/combo-tree.d.ts +0 -103
- package/dist/places/components/ui/combobox.d.ts +0 -64
- package/dist/places/components/ui/command.d.ts +0 -89
- package/dist/places/components/ui/context-menu.d.ts +0 -122
- package/dist/places/components/ui/data-list.d.ts +0 -86
- package/dist/places/components/ui/date-picker.d.ts +0 -19
- package/dist/places/components/ui/dialog-wizard.d.ts +0 -100
- package/dist/places/components/ui/dialog.d.ts +0 -229
- package/dist/places/components/ui/disabled-menu-item.d.ts +0 -25
- package/dist/places/components/ui/drawer.d.ts +0 -94
- package/dist/places/components/ui/dropdown-menu.d.ts +0 -180
- package/dist/places/components/ui/electronic-signature-dialog.d.ts +0 -31
- package/dist/places/components/ui/empty-state.d.ts +0 -79
- package/dist/places/components/ui/export-dialog.d.ts +0 -48
- package/dist/places/components/ui/form.d.ts +0 -119
- package/dist/places/components/ui/grid.d.ts +0 -53
- package/dist/places/components/ui/hover-card.d.ts +0 -21
- package/dist/places/components/ui/icon-picker.d.ts +0 -17
- package/dist/places/components/ui/iframe-dialog.d.ts +0 -24
- package/dist/places/components/ui/input-group.d.ts +0 -113
- package/dist/places/components/ui/input.d.ts +0 -24
- package/dist/places/components/ui/label.d.ts +0 -23
- package/dist/places/components/ui/loading-state.d.ts +0 -52
- package/dist/places/components/ui/menubar.d.ts +0 -113
- package/dist/places/components/ui/multiselect-permissions.d.ts +0 -84
- package/dist/places/components/ui/navigation-menu.d.ts +0 -57
- package/dist/places/components/ui/onboarding-dialog.d.ts +0 -58
- package/dist/places/components/ui/online-editor-dialog.d.ts +0 -28
- package/dist/places/components/ui/page-breadcrumb.d.ts +0 -77
- package/dist/places/components/ui/pagination.d.ts +0 -81
- package/dist/places/components/ui/popover.d.ts +0 -57
- package/dist/places/components/ui/progress.d.ts +0 -22
- package/dist/places/components/ui/radio-group.d.ts +0 -66
- package/dist/places/components/ui/report-request-list.d.ts +0 -64
- package/dist/places/components/ui/resizable.d.ts +0 -38
- package/dist/places/components/ui/rich-text-editor.d.ts +0 -58
- package/dist/places/components/ui/scroll-area.d.ts +0 -40
- package/dist/places/components/ui/select.d.ts +0 -94
- package/dist/places/components/ui/separator.d.ts +0 -17
- package/dist/places/components/ui/sheet.d.ts +0 -108
- package/dist/places/components/ui/sidebar.d.ts +0 -269
- package/dist/places/components/ui/skeleton-variants.d.ts +0 -41
- package/dist/places/components/ui/skeleton.d.ts +0 -14
- package/dist/places/components/ui/slider.d.ts +0 -9
- package/dist/places/components/ui/sonner.d.ts +0 -8
- package/dist/places/components/ui/spinner.d.ts +0 -11
- package/dist/places/components/ui/split-button.d.ts +0 -76
- package/dist/places/components/ui/stack.d.ts +0 -17
- package/dist/places/components/ui/status-badge.d.ts +0 -52
- package/dist/places/components/ui/step-selector.d.ts +0 -46
- package/dist/places/components/ui/stimulsoft-viewer.d.ts +0 -28
- package/dist/places/components/ui/switch.d.ts +0 -25
- package/dist/places/components/ui/tab-page-layout.d.ts +0 -52
- package/dist/places/components/ui/table-resize-handle.d.ts +0 -22
- package/dist/places/components/ui/table.d.ts +0 -112
- package/dist/places/components/ui/tabs.d.ts +0 -66
- package/dist/places/components/ui/terms-of-use-dialog.d.ts +0 -102
- package/dist/places/components/ui/textarea.d.ts +0 -33
- package/dist/places/components/ui/timepicker.d.ts +0 -34
- package/dist/places/components/ui/toggle-group.d.ts +0 -37
- package/dist/places/components/ui/toggle.d.ts +0 -33
- package/dist/places/components/ui/tooltip.d.ts +0 -61
- package/dist/places/components/ui/truncated-cell.d.ts +0 -20
- package/dist/places/components/ui/typography.d.ts +0 -135
- package/dist/places/components/ui/updates-notification.d.ts +0 -47
- package/dist/places/components/ui/users-groups-selector.d.ts +0 -87
- package/dist/places/components/ui/viewer-dialog.d.ts +0 -184
- package/dist/places/config/backend.d.ts +0 -10
- package/dist/places/config/environments.d.ts +0 -27
- package/dist/places/config/index.d.ts +0 -75
- package/dist/places/contexts/LocaleContext.d.ts +0 -15
- package/dist/places/contexts/ModalStateContext.d.ts +0 -57
- package/dist/places/contexts/ModuleContext.d.ts +0 -34
- package/dist/places/contexts/NavigationContext.d.ts +0 -13
- package/dist/places/contexts/PageMetadataContext.d.ts +0 -48
- package/dist/places/crud/components/ActionMenuItems.d.ts +0 -22
- package/dist/places/crud/components/BaseForm.d.ts +0 -52
- package/dist/places/crud/components/ColumnSettingsPopover.d.ts +0 -28
- package/dist/places/crud/components/ContextMenu.d.ts +0 -21
- package/dist/places/crud/components/CrudActionBar.d.ts +0 -59
- package/dist/places/crud/components/CrudGrid.d.ts +0 -53
- package/dist/places/crud/components/CrudPagination.d.ts +0 -17
- package/dist/places/crud/components/CrudTable.d.ts +0 -66
- package/dist/places/crud/components/FilterBar.d.ts +0 -136
- package/dist/places/crud/components/GroupDropZone.d.ts +0 -16
- package/dist/places/crud/components/InlineRowActions.d.ts +0 -15
- package/dist/places/crud/components/SelectionCheckbox.d.ts +0 -9
- package/dist/places/crud/components/TableFooter.d.ts +0 -14
- package/dist/places/crud/components/TableRowActions.d.ts +0 -19
- package/dist/places/crud/createCrudPage.d.ts +0 -134
- package/dist/places/crud/createSimpleService.d.ts +0 -85
- package/dist/places/crud/generateCrudConfig.d.ts +0 -78
- package/dist/places/crud/hooks/useBaseForm.d.ts +0 -47
- package/dist/places/crud/hooks/useColumnDragReorder.d.ts +0 -19
- package/dist/places/crud/hooks/useColumnManager.d.ts +0 -85
- package/dist/places/crud/hooks/useCrud.d.ts +0 -152
- package/dist/places/crud/primitives/ActionMenu.d.ts +0 -69
- package/dist/places/crud/primitives/FilterBar.d.ts +0 -69
- package/dist/places/crud/primitives/Pagination.d.ts +0 -29
- package/dist/places/crud/primitives/Table.d.ts +0 -31
- package/dist/places/crud/primitives/TreeTable.d.ts +0 -7
- package/dist/places/crud/primitives/index.d.ts +0 -12
- package/dist/places/crud/primitives/types.d.ts +0 -199
- package/dist/places/crud/utils/routingHelpers.d.ts +0 -41
- package/dist/places/custom-form-fields/components/CustomFormFields.d.ts +0 -11
- package/dist/places/custom-form-fields/fields/FormDateField.d.ts +0 -9
- package/dist/places/custom-form-fields/fields/FormMultiSelectionField.d.ts +0 -9
- package/dist/places/custom-form-fields/fields/FormNumericField.d.ts +0 -9
- package/dist/places/custom-form-fields/fields/FormQuestionsField.d.ts +0 -9
- package/dist/places/custom-form-fields/fields/FormSingleSelectionField.d.ts +0 -9
- package/dist/places/custom-form-fields/fields/FormTextField.d.ts +0 -9
- package/dist/places/custom-form-fields/fields/FormTimeField.d.ts +0 -9
- package/dist/places/custom-form-fields/fields/FormUrlField.d.ts +0 -9
- package/dist/places/custom-form-fields/fields/ReadOnlyTextField.d.ts +0 -9
- package/dist/places/custom-form-fields/index.d.ts +0 -13
- package/dist/places/custom-form-fields/types.d.ts +0 -206
- package/dist/places/exports/action-plans.d.ts +0 -16
- package/dist/places/exports/audit-trail.d.ts +0 -1
- package/dist/places/exports/crud.d.ts +0 -31
- package/dist/places/exports/custom-form-fields.d.ts +0 -1
- package/dist/places/exports/file-upload.d.ts +0 -1
- package/dist/places/exports/integrations.d.ts +0 -15
- package/dist/places/exports/ui.d.ts +0 -100
- package/dist/places/file-upload/components/SingleFileUpload.d.ts +0 -102
- package/dist/places/file-upload/index.d.ts +0 -6
- package/dist/places/file-upload/types.d.ts +0 -26
- package/dist/places/file-upload/utils/formatBytes.d.ts +0 -6
- package/dist/places/file-upload/utils/getFileExtension.d.ts +0 -6
- package/dist/places/hooks/useActiveModules.d.ts +0 -45
- package/dist/places/hooks/useAliasFromUrl.d.ts +0 -33
- package/dist/places/hooks/useColumnResize.d.ts +0 -45
- package/dist/places/hooks/useDebounce.d.ts +0 -56
- package/dist/places/hooks/useDerivedContractedModules.d.ts +0 -8
- package/dist/places/hooks/useI18nFormatters.d.ts +0 -40
- package/dist/places/hooks/useMediaQuery.d.ts +0 -14
- package/dist/places/hooks/useModuleAccess.d.ts +0 -59
- package/dist/places/hooks/usePageTitle.d.ts +0 -10
- package/dist/places/hooks/usePermissionQuery.d.ts +0 -49
- package/dist/places/hooks/useRowResize.d.ts +0 -37
- package/dist/places/hooks/useSidebarResize.d.ts +0 -37
- package/dist/places/hooks/useUpdatesNotification.d.ts +0 -27
- package/dist/places/hooks/useWizard.d.ts +0 -40
- package/dist/places/i18n/LanguageBootstrap.d.ts +0 -14
- package/dist/places/i18n/config.d.ts +0 -13
- package/dist/places/i18n/constants.d.ts +0 -126
- package/dist/places/i18n/index.d.ts +0 -12
- package/dist/places/i18n/utils.d.ts +0 -14
- package/dist/places/integrations/clarity/clarityTracking.d.ts +0 -31
- package/dist/places/integrations/clarity/index.d.ts +0 -3
- package/dist/places/integrations/clarity/types.d.ts +0 -46
- package/dist/places/integrations/clarity/useClarity.d.ts +0 -34
- package/dist/places/integrations/index.d.ts +0 -5
- package/dist/places/leadership/components/LeadershipDialog.d.ts +0 -10
- package/dist/places/leadership/components/LeadershipForm.d.ts +0 -8
- package/dist/places/leadership/components/LeadershipPage.d.ts +0 -19
- package/dist/places/leadership/hooks/useLeadershipApi.d.ts +0 -4
- package/dist/places/leadership/hooks/useLeadershipMutations.d.ts +0 -29
- package/dist/places/leadership/index.d.ts +0 -13
- package/dist/places/leadership/types.d.ts +0 -23
- package/dist/places/leadership/utils/leadershipUtils.d.ts +0 -8
- package/dist/places/media/components/ImageEditor.d.ts +0 -22
- package/dist/places/media/components/ImageRenderer.d.ts +0 -23
- package/dist/places/media/components/VideoEditor.d.ts +0 -2
- package/dist/places/media/components/VideoRenderer.d.ts +0 -2
- package/dist/places/media/hooks/useMediaUpload.d.ts +0 -19
- package/dist/places/media/index.d.ts +0 -49
- package/dist/places/media/types.d.ts +0 -66
- package/dist/places/media/utils/imageHelpers.d.ts +0 -28
- package/dist/places/media/utils/videoHelpers.d.ts +0 -35
- package/dist/places/mind-map/components/MindMap.d.ts +0 -23
- package/dist/places/mind-map/components/MindMapConnection.d.ts +0 -12
- package/dist/places/mind-map/components/MindMapNodeView.d.ts +0 -24
- package/dist/places/mind-map/components/MindMapToolbar.d.ts +0 -26
- package/dist/places/mind-map/hooks/useMindMapKeyboard.d.ts +0 -15
- package/dist/places/mind-map/hooks/useMindMapLayout.d.ts +0 -5
- package/dist/places/mind-map/hooks/useMindMapPanZoom.d.ts +0 -21
- package/dist/places/mind-map/hooks/useMindMapState.d.ts +0 -32
- package/dist/places/mind-map/index.d.ts +0 -4
- package/dist/places/mind-map/types.d.ts +0 -91
- package/dist/places/mind-map/utils/export-image.d.ts +0 -9
- package/dist/places/mind-map/utils/layout.d.ts +0 -15
- package/dist/places/mind-map/utils/nodeOps.d.ts +0 -66
- package/dist/places/mind-map/utils/serialize.d.ts +0 -10
- package/dist/places/modules/softwaresMap.d.ts +0 -4
- package/dist/places/places/components/ManageAccessModal.d.ts +0 -11
- package/dist/places/places/components/PlaceCard.d.ts +0 -12
- package/dist/places/places/components/PlacesList.d.ts +0 -12
- package/dist/places/places/index.d.ts +0 -8
- package/dist/places/places/services/PlaceService.d.ts +0 -9
- package/dist/places/places/types.d.ts +0 -10
- package/dist/places/providers/CoreProviders.d.ts +0 -107
- package/dist/places/providers/index.d.ts +0 -2
- package/dist/places/qualiex/components/QualiexUserField.d.ts +0 -133
- package/dist/places/qualiex/hooks/useQualiexUsers.d.ts +0 -41
- package/dist/places/qualiex/services/qualiexApi.d.ts +0 -75
- package/dist/places/qualiex/utils/QualiexErrorInterceptor.d.ts +0 -20
- package/dist/places/qualiex/utils/userPlaceUtils.d.ts +0 -16
- package/dist/places/services/BaseService.d.ts +0 -51
- package/dist/places/services/EmailService.d.ts +0 -110
- package/dist/places/services/ErrorService.d.ts +0 -19
- package/dist/places/services/QualiexEnrichmentService.d.ts +0 -53
- package/dist/places/services/QualiexFieldHelpers.d.ts +0 -17
- package/dist/places/setup/favicon.d.ts +0 -1
- package/dist/places/setup.d.ts +0 -16
- package/dist/places/sign/components/D4SignWidget.d.ts +0 -2
- package/dist/places/sign/components/DocumentSigner.d.ts +0 -2
- package/dist/places/sign/components/SignConfigForm.d.ts +0 -2
- package/dist/places/sign/components/SignWidget.d.ts +0 -9
- package/dist/places/sign/hooks/useSignConfig.d.ts +0 -6
- package/dist/places/sign/index.d.ts +0 -8
- package/dist/places/sign/services/signService.d.ts +0 -17
- package/dist/places/sign/types.d.ts +0 -53
- package/dist/places/sign/utils/loadClicksignScript.d.ts +0 -13
- package/dist/places/supabase/SupabaseSingleton.d.ts +0 -34
- package/dist/places/supabase/client.d.ts +0 -2
- package/dist/places/supabase/legacyKeyGuard.d.ts +0 -19
- package/dist/places/supabase/publicClient.d.ts +0 -2
- package/dist/places/supabase/types.d.ts +0 -377
- package/dist/places/team-selector/components/TeamSelector.d.ts +0 -24
- package/dist/places/team-selector/index.d.ts +0 -2
- package/dist/places/team-selector/types.d.ts +0 -10
- package/dist/places/types/sidebar.d.ts +0 -52
- package/dist/places/utils/color.d.ts +0 -26
- package/dist/places/utils/formatters/currencyFormatters.d.ts +0 -1
- package/dist/places/utils/formatters/dateFormatters.d.ts +0 -52
- package/dist/places/utils/index.d.ts +0 -9
- package/dist/places/utils/linkHelpers.d.ts +0 -9
- package/dist/places/utils/load-fonts.d.ts +0 -1
- package/dist/sign/action-plans/components/ActionPlanAttachmentsTab.d.ts +0 -21
- package/dist/sign/action-plans/components/ActionPlanCommentsTab.d.ts +0 -21
- package/dist/sign/action-plans/components/ActionPlanCostTab.d.ts +0 -15
- package/dist/sign/action-plans/components/ActionPlanGeneralTab.d.ts +0 -21
- package/dist/sign/action-plans/components/ActionPlanHistoryTab.d.ts +0 -16
- package/dist/sign/action-plans/components/ActionPlanPage.d.ts +0 -25
- package/dist/sign/action-plans/components/ActionPlanPredecessorsTab.d.ts +0 -15
- package/dist/sign/action-plans/components/ActionPlanProgressDialog.d.ts +0 -16
- package/dist/sign/action-plans/components/ActionPlanProgressTab.d.ts +0 -10
- package/dist/sign/action-plans/components/ActionPlanStatusBadge.d.ts +0 -18
- package/dist/sign/action-plans/constants.d.ts +0 -86
- package/dist/sign/action-plans/hooks/useActionPlan.d.ts +0 -19
- package/dist/sign/action-plans/hooks/useActionPlanProgress.d.ts +0 -20
- package/dist/sign/action-plans/index.d.ts +0 -15
- package/dist/sign/action-plans/types.d.ts +0 -413
- package/dist/sign/action-plans/utils/formatTime.d.ts +0 -24
- package/dist/sign/approval-flow/components/ApprovalSidenav.d.ts +0 -16
- package/dist/sign/approval-flow/components/ApproveDialog.d.ts +0 -13
- package/dist/sign/approval-flow/components/SelectApproverDialog.d.ts +0 -11
- package/dist/sign/approval-flow/index.d.ts +0 -4
- package/dist/sign/approval-flow/types.d.ts +0 -76
- package/dist/sign/assets/index.d.ts +0 -7
- package/dist/sign/audit-trail/components/AuditTrailDetails.d.ts +0 -27
- package/dist/sign/audit-trail/components/AuditTrailFilter.d.ts +0 -29
- package/dist/sign/audit-trail/components/AuditTrailPage.d.ts +0 -40
- package/dist/sign/audit-trail/index.d.ts +0 -9
- package/dist/sign/audit-trail/types.d.ts +0 -209
- package/dist/sign/audit-trail/utils.d.ts +0 -54
- package/dist/sign/auth/components/AliasRedirect.d.ts +0 -13
- package/dist/sign/auth/components/AliasRouteGuard.d.ts +0 -20
- package/dist/sign/auth/components/EditProfileDialog.d.ts +0 -13
- package/dist/sign/auth/components/ProtectedRoute.d.ts +0 -11
- package/dist/sign/auth/components/UserInfo.d.ts +0 -10
- package/dist/sign/auth/contexts/AuthContext.d.ts +0 -89
- package/dist/sign/auth/pages/CallbackPage.d.ts +0 -6
- package/dist/sign/auth/pages/LoginPage.d.ts +0 -2
- package/dist/sign/auth/services/AuthService.d.ts +0 -64
- package/dist/sign/auth/services/SupabaseTokenService.d.ts +0 -3
- package/dist/sign/auth/services/TokenManager.d.ts +0 -66
- package/dist/sign/auth/services/TokenRegenerationService.d.ts +0 -14
- package/dist/sign/auth/services/TokenService.d.ts +0 -48
- package/dist/sign/auth/utils/ErrorInterceptor.d.ts +0 -20
- package/dist/sign/components/ErrorBoundary.d.ts +0 -19
- package/dist/sign/components/dashboards/dashboard-form.d.ts +0 -65
- package/dist/sign/components/dashboards/dashboard-general-view.d.ts +0 -124
- package/dist/sign/components/dashboards/dashboard-grid.d.ts +0 -66
- package/dist/sign/components/dashboards/dashboard-list.d.ts +0 -41
- package/dist/sign/components/dashboards/dashboard-panel-renderer.d.ts +0 -31
- package/dist/sign/components/dashboards/dashboard-view.d.ts +0 -48
- package/dist/sign/components/dashboards/helpers.d.ts +0 -86
- package/dist/sign/components/dashboards/index.d.ts +0 -9
- package/dist/sign/components/dashboards/panels/burndown-panel.d.ts +0 -41
- package/dist/sign/components/dashboards/panels/cartesian-panel.d.ts +0 -66
- package/dist/sign/components/dashboards/panels/index.d.ts +0 -14
- package/dist/sign/components/dashboards/panels/list-panel.d.ts +0 -45
- package/dist/sign/components/dashboards/panels/matrix-risk-panel.d.ts +0 -74
- package/dist/sign/components/dashboards/panels/numeric-panel.d.ts +0 -32
- package/dist/sign/components/dashboards/panels/panel-error.d.ts +0 -18
- package/dist/sign/components/dashboards/panels/panel-header.d.ts +0 -27
- package/dist/sign/components/dashboards/panels/panel-loader.d.ts +0 -17
- package/dist/sign/components/dashboards/panels/panel-no-data.d.ts +0 -16
- package/dist/sign/components/dashboards/panels/panel-unavailable.d.ts +0 -16
- package/dist/sign/components/dashboards/panels/pareto-panel.d.ts +0 -30
- package/dist/sign/components/dashboards/panels/performance-panel.d.ts +0 -39
- package/dist/sign/components/dashboards/panels/pie-panel.d.ts +0 -29
- package/dist/sign/components/dashboards/panels/text-panel.d.ts +0 -28
- package/dist/sign/components/dashboards/types.d.ts +0 -755
- package/dist/sign/components/layout/AppHeader.d.ts +0 -6
- package/dist/sign/components/layout/AppLayout.d.ts +0 -10
- package/dist/sign/components/layout/AppSidebar.d.ts +0 -10
- package/dist/sign/components/layout/BodyContent.d.ts +0 -60
- package/dist/sign/components/layout/SidebarActionTrigger.d.ts +0 -46
- package/dist/sign/components/layout/SidebarHeader.d.ts +0 -5
- package/dist/sign/components/layout/SidebarLogo.d.ts +0 -5
- package/dist/sign/components/layout/sidebar-utils.d.ts +0 -12
- package/dist/sign/components/modules/AccessDeniedDialog.d.ts +0 -43
- package/dist/sign/components/modules/ModuleAccessGuard.d.ts +0 -42
- package/dist/sign/components/modules/ModuleGrid.d.ts +0 -9
- package/dist/sign/components/modules/ModuleOfferContent.d.ts +0 -20
- package/dist/sign/components/modules/ModulesContent.d.ts +0 -21
- package/dist/sign/components/modules/ModulesDialog.d.ts +0 -3
- package/dist/sign/components/modules/ModulesFooterCards.d.ts +0 -10
- package/dist/sign/components/modules/icons/ModulesCardIcons.d.ts +0 -19
- package/dist/sign/components/modules/index.d.ts +0 -14
- package/dist/sign/components/modules/modulesData.d.ts +0 -6
- package/dist/sign/components/modules/types.d.ts +0 -41
- package/dist/sign/components/ui/accordion.d.ts +0 -42
- package/dist/sign/components/ui/action-button.d.ts +0 -48
- package/dist/sign/components/ui/alert-dialog.d.ts +0 -102
- package/dist/sign/components/ui/alert.d.ts +0 -44
- package/dist/sign/components/ui/avatar.d.ts +0 -36
- package/dist/sign/components/ui/badge.d.ts +0 -41
- package/dist/sign/components/ui/breadcrumb.d.ts +0 -73
- package/dist/sign/components/ui/button-group.d.ts +0 -24
- package/dist/sign/components/ui/button.d.ts +0 -66
- package/dist/sign/components/ui/calendar.d.ts +0 -24
- package/dist/sign/components/ui/card.d.ts +0 -57
- package/dist/sign/components/ui/chart.d.ts +0 -97
- package/dist/sign/components/ui/checkbox.d.ts +0 -15
- package/dist/sign/components/ui/collapsible.d.ts +0 -20
- package/dist/sign/components/ui/color-picker.d.ts +0 -19
- package/dist/sign/components/ui/combo-tree.d.ts +0 -103
- package/dist/sign/components/ui/combobox.d.ts +0 -64
- package/dist/sign/components/ui/command.d.ts +0 -89
- package/dist/sign/components/ui/context-menu.d.ts +0 -122
- package/dist/sign/components/ui/data-list.d.ts +0 -86
- package/dist/sign/components/ui/date-picker.d.ts +0 -19
- package/dist/sign/components/ui/dialog-wizard.d.ts +0 -100
- package/dist/sign/components/ui/dialog.d.ts +0 -229
- package/dist/sign/components/ui/disabled-menu-item.d.ts +0 -25
- package/dist/sign/components/ui/drawer.d.ts +0 -94
- package/dist/sign/components/ui/dropdown-menu.d.ts +0 -180
- package/dist/sign/components/ui/electronic-signature-dialog.d.ts +0 -31
- package/dist/sign/components/ui/empty-state.d.ts +0 -79
- package/dist/sign/components/ui/export-dialog.d.ts +0 -48
- package/dist/sign/components/ui/form.d.ts +0 -119
- package/dist/sign/components/ui/grid.d.ts +0 -53
- package/dist/sign/components/ui/hover-card.d.ts +0 -21
- package/dist/sign/components/ui/icon-picker.d.ts +0 -17
- package/dist/sign/components/ui/iframe-dialog.d.ts +0 -24
- package/dist/sign/components/ui/input-group.d.ts +0 -113
- package/dist/sign/components/ui/input.d.ts +0 -24
- package/dist/sign/components/ui/label.d.ts +0 -23
- package/dist/sign/components/ui/loading-state.d.ts +0 -52
- package/dist/sign/components/ui/menubar.d.ts +0 -113
- package/dist/sign/components/ui/multiselect-permissions.d.ts +0 -84
- package/dist/sign/components/ui/navigation-menu.d.ts +0 -57
- package/dist/sign/components/ui/onboarding-dialog.d.ts +0 -58
- package/dist/sign/components/ui/online-editor-dialog.d.ts +0 -28
- package/dist/sign/components/ui/page-breadcrumb.d.ts +0 -77
- package/dist/sign/components/ui/pagination.d.ts +0 -81
- package/dist/sign/components/ui/popover.d.ts +0 -57
- package/dist/sign/components/ui/progress.d.ts +0 -22
- package/dist/sign/components/ui/radio-group.d.ts +0 -66
- package/dist/sign/components/ui/report-request-list.d.ts +0 -64
- package/dist/sign/components/ui/resizable.d.ts +0 -38
- package/dist/sign/components/ui/rich-text-editor.d.ts +0 -58
- package/dist/sign/components/ui/scroll-area.d.ts +0 -40
- package/dist/sign/components/ui/select.d.ts +0 -94
- package/dist/sign/components/ui/separator.d.ts +0 -17
- package/dist/sign/components/ui/sheet.d.ts +0 -108
- package/dist/sign/components/ui/sidebar.d.ts +0 -269
- package/dist/sign/components/ui/skeleton-variants.d.ts +0 -41
- package/dist/sign/components/ui/skeleton.d.ts +0 -14
- package/dist/sign/components/ui/slider.d.ts +0 -9
- package/dist/sign/components/ui/sonner.d.ts +0 -8
- package/dist/sign/components/ui/spinner.d.ts +0 -11
- package/dist/sign/components/ui/split-button.d.ts +0 -76
- package/dist/sign/components/ui/stack.d.ts +0 -17
- package/dist/sign/components/ui/status-badge.d.ts +0 -52
- package/dist/sign/components/ui/step-selector.d.ts +0 -46
- package/dist/sign/components/ui/stimulsoft-viewer.d.ts +0 -28
- package/dist/sign/components/ui/switch.d.ts +0 -25
- package/dist/sign/components/ui/tab-page-layout.d.ts +0 -52
- package/dist/sign/components/ui/table-resize-handle.d.ts +0 -22
- package/dist/sign/components/ui/table.d.ts +0 -112
- package/dist/sign/components/ui/tabs.d.ts +0 -66
- package/dist/sign/components/ui/terms-of-use-dialog.d.ts +0 -102
- package/dist/sign/components/ui/textarea.d.ts +0 -33
- package/dist/sign/components/ui/timepicker.d.ts +0 -34
- package/dist/sign/components/ui/toggle-group.d.ts +0 -37
- package/dist/sign/components/ui/toggle.d.ts +0 -33
- package/dist/sign/components/ui/tooltip.d.ts +0 -61
- package/dist/sign/components/ui/truncated-cell.d.ts +0 -20
- package/dist/sign/components/ui/typography.d.ts +0 -135
- package/dist/sign/components/ui/updates-notification.d.ts +0 -47
- package/dist/sign/components/ui/users-groups-selector.d.ts +0 -87
- package/dist/sign/components/ui/viewer-dialog.d.ts +0 -184
- package/dist/sign/config/backend.d.ts +0 -10
- package/dist/sign/config/environments.d.ts +0 -27
- package/dist/sign/config/index.d.ts +0 -75
- package/dist/sign/contexts/LocaleContext.d.ts +0 -15
- package/dist/sign/contexts/ModalStateContext.d.ts +0 -57
- package/dist/sign/contexts/ModuleContext.d.ts +0 -34
- package/dist/sign/contexts/NavigationContext.d.ts +0 -13
- package/dist/sign/contexts/PageMetadataContext.d.ts +0 -48
- package/dist/sign/crud/components/ActionMenuItems.d.ts +0 -22
- package/dist/sign/crud/components/BaseForm.d.ts +0 -52
- package/dist/sign/crud/components/ColumnSettingsPopover.d.ts +0 -28
- package/dist/sign/crud/components/ContextMenu.d.ts +0 -21
- package/dist/sign/crud/components/CrudActionBar.d.ts +0 -59
- package/dist/sign/crud/components/CrudGrid.d.ts +0 -53
- package/dist/sign/crud/components/CrudPagination.d.ts +0 -17
- package/dist/sign/crud/components/CrudTable.d.ts +0 -66
- package/dist/sign/crud/components/FilterBar.d.ts +0 -136
- package/dist/sign/crud/components/GroupDropZone.d.ts +0 -16
- package/dist/sign/crud/components/InlineRowActions.d.ts +0 -15
- package/dist/sign/crud/components/SelectionCheckbox.d.ts +0 -9
- package/dist/sign/crud/components/TableFooter.d.ts +0 -14
- package/dist/sign/crud/components/TableRowActions.d.ts +0 -19
- package/dist/sign/crud/createCrudPage.d.ts +0 -134
- package/dist/sign/crud/createSimpleService.d.ts +0 -85
- package/dist/sign/crud/generateCrudConfig.d.ts +0 -78
- package/dist/sign/crud/hooks/useBaseForm.d.ts +0 -47
- package/dist/sign/crud/hooks/useColumnDragReorder.d.ts +0 -19
- package/dist/sign/crud/hooks/useColumnManager.d.ts +0 -85
- package/dist/sign/crud/hooks/useCrud.d.ts +0 -152
- package/dist/sign/crud/primitives/ActionMenu.d.ts +0 -69
- package/dist/sign/crud/primitives/FilterBar.d.ts +0 -69
- package/dist/sign/crud/primitives/Pagination.d.ts +0 -29
- package/dist/sign/crud/primitives/Table.d.ts +0 -31
- package/dist/sign/crud/primitives/TreeTable.d.ts +0 -7
- package/dist/sign/crud/primitives/index.d.ts +0 -12
- package/dist/sign/crud/primitives/types.d.ts +0 -199
- package/dist/sign/crud/utils/routingHelpers.d.ts +0 -41
- package/dist/sign/custom-form-fields/components/CustomFormFields.d.ts +0 -11
- package/dist/sign/custom-form-fields/fields/FormDateField.d.ts +0 -9
- package/dist/sign/custom-form-fields/fields/FormMultiSelectionField.d.ts +0 -9
- package/dist/sign/custom-form-fields/fields/FormNumericField.d.ts +0 -9
- package/dist/sign/custom-form-fields/fields/FormQuestionsField.d.ts +0 -9
- package/dist/sign/custom-form-fields/fields/FormSingleSelectionField.d.ts +0 -9
- package/dist/sign/custom-form-fields/fields/FormTextField.d.ts +0 -9
- package/dist/sign/custom-form-fields/fields/FormTimeField.d.ts +0 -9
- package/dist/sign/custom-form-fields/fields/FormUrlField.d.ts +0 -9
- package/dist/sign/custom-form-fields/fields/ReadOnlyTextField.d.ts +0 -9
- package/dist/sign/custom-form-fields/index.d.ts +0 -13
- package/dist/sign/custom-form-fields/types.d.ts +0 -206
- package/dist/sign/exports/action-plans.d.ts +0 -16
- package/dist/sign/exports/audit-trail.d.ts +0 -1
- package/dist/sign/exports/crud.d.ts +0 -31
- package/dist/sign/exports/custom-form-fields.d.ts +0 -1
- package/dist/sign/exports/file-upload.d.ts +0 -1
- package/dist/sign/exports/integrations.d.ts +0 -15
- package/dist/sign/exports/ui.d.ts +0 -100
- package/dist/sign/file-upload/components/SingleFileUpload.d.ts +0 -102
- package/dist/sign/file-upload/index.d.ts +0 -6
- package/dist/sign/file-upload/types.d.ts +0 -26
- package/dist/sign/file-upload/utils/formatBytes.d.ts +0 -6
- package/dist/sign/file-upload/utils/getFileExtension.d.ts +0 -6
- package/dist/sign/hooks/useActiveModules.d.ts +0 -45
- package/dist/sign/hooks/useAliasFromUrl.d.ts +0 -33
- package/dist/sign/hooks/useColumnResize.d.ts +0 -45
- package/dist/sign/hooks/useDebounce.d.ts +0 -56
- package/dist/sign/hooks/useDerivedContractedModules.d.ts +0 -8
- package/dist/sign/hooks/useI18nFormatters.d.ts +0 -40
- package/dist/sign/hooks/useMediaQuery.d.ts +0 -14
- package/dist/sign/hooks/useModuleAccess.d.ts +0 -59
- package/dist/sign/hooks/usePageTitle.d.ts +0 -10
- package/dist/sign/hooks/usePermissionQuery.d.ts +0 -49
- package/dist/sign/hooks/useRowResize.d.ts +0 -37
- package/dist/sign/hooks/useSidebarResize.d.ts +0 -37
- package/dist/sign/hooks/useUpdatesNotification.d.ts +0 -27
- package/dist/sign/hooks/useWizard.d.ts +0 -40
- package/dist/sign/i18n/LanguageBootstrap.d.ts +0 -14
- package/dist/sign/i18n/config.d.ts +0 -13
- package/dist/sign/i18n/constants.d.ts +0 -126
- package/dist/sign/i18n/index.d.ts +0 -12
- package/dist/sign/i18n/utils.d.ts +0 -14
- package/dist/sign/integrations/clarity/clarityTracking.d.ts +0 -31
- package/dist/sign/integrations/clarity/index.d.ts +0 -3
- package/dist/sign/integrations/clarity/types.d.ts +0 -46
- package/dist/sign/integrations/clarity/useClarity.d.ts +0 -34
- package/dist/sign/integrations/index.d.ts +0 -5
- package/dist/sign/leadership/components/LeadershipDialog.d.ts +0 -10
- package/dist/sign/leadership/components/LeadershipForm.d.ts +0 -8
- package/dist/sign/leadership/components/LeadershipPage.d.ts +0 -19
- package/dist/sign/leadership/hooks/useLeadershipApi.d.ts +0 -4
- package/dist/sign/leadership/hooks/useLeadershipMutations.d.ts +0 -29
- package/dist/sign/leadership/index.d.ts +0 -13
- package/dist/sign/leadership/types.d.ts +0 -23
- package/dist/sign/leadership/utils/leadershipUtils.d.ts +0 -8
- package/dist/sign/media/components/ImageEditor.d.ts +0 -22
- package/dist/sign/media/components/ImageRenderer.d.ts +0 -23
- package/dist/sign/media/components/VideoEditor.d.ts +0 -2
- package/dist/sign/media/components/VideoRenderer.d.ts +0 -2
- package/dist/sign/media/hooks/useMediaUpload.d.ts +0 -19
- package/dist/sign/media/index.d.ts +0 -49
- package/dist/sign/media/types.d.ts +0 -66
- package/dist/sign/media/utils/imageHelpers.d.ts +0 -28
- package/dist/sign/media/utils/videoHelpers.d.ts +0 -35
- package/dist/sign/mind-map/components/MindMap.d.ts +0 -23
- package/dist/sign/mind-map/components/MindMapConnection.d.ts +0 -12
- package/dist/sign/mind-map/components/MindMapNodeView.d.ts +0 -24
- package/dist/sign/mind-map/components/MindMapToolbar.d.ts +0 -26
- package/dist/sign/mind-map/hooks/useMindMapKeyboard.d.ts +0 -15
- package/dist/sign/mind-map/hooks/useMindMapLayout.d.ts +0 -5
- package/dist/sign/mind-map/hooks/useMindMapPanZoom.d.ts +0 -21
- package/dist/sign/mind-map/hooks/useMindMapState.d.ts +0 -32
- package/dist/sign/mind-map/index.d.ts +0 -4
- package/dist/sign/mind-map/types.d.ts +0 -91
- package/dist/sign/mind-map/utils/export-image.d.ts +0 -9
- package/dist/sign/mind-map/utils/layout.d.ts +0 -15
- package/dist/sign/mind-map/utils/nodeOps.d.ts +0 -66
- package/dist/sign/mind-map/utils/serialize.d.ts +0 -10
- package/dist/sign/modules/softwaresMap.d.ts +0 -4
- package/dist/sign/places/components/ManageAccessModal.d.ts +0 -11
- package/dist/sign/places/components/PlaceCard.d.ts +0 -12
- package/dist/sign/places/components/PlacesList.d.ts +0 -12
- package/dist/sign/places/index.d.ts +0 -8
- package/dist/sign/places/services/PlaceService.d.ts +0 -9
- package/dist/sign/places/types.d.ts +0 -10
- package/dist/sign/providers/CoreProviders.d.ts +0 -107
- package/dist/sign/providers/index.d.ts +0 -2
- package/dist/sign/qualiex/components/QualiexUserField.d.ts +0 -133
- package/dist/sign/qualiex/hooks/useQualiexUsers.d.ts +0 -41
- package/dist/sign/qualiex/services/qualiexApi.d.ts +0 -75
- package/dist/sign/qualiex/utils/QualiexErrorInterceptor.d.ts +0 -20
- package/dist/sign/qualiex/utils/userPlaceUtils.d.ts +0 -16
- package/dist/sign/services/BaseService.d.ts +0 -51
- package/dist/sign/services/EmailService.d.ts +0 -110
- package/dist/sign/services/ErrorService.d.ts +0 -19
- package/dist/sign/services/QualiexEnrichmentService.d.ts +0 -53
- package/dist/sign/services/QualiexFieldHelpers.d.ts +0 -17
- package/dist/sign/setup/favicon.d.ts +0 -1
- package/dist/sign/setup.d.ts +0 -16
- package/dist/sign/sign/components/D4SignWidget.d.ts +0 -2
- package/dist/sign/sign/components/DocumentSigner.d.ts +0 -2
- package/dist/sign/sign/components/SignConfigForm.d.ts +0 -2
- package/dist/sign/sign/components/SignWidget.d.ts +0 -9
- package/dist/sign/sign/hooks/useSignConfig.d.ts +0 -6
- package/dist/sign/sign/index.d.ts +0 -8
- package/dist/sign/sign/services/signService.d.ts +0 -17
- package/dist/sign/sign/types.d.ts +0 -53
- package/dist/sign/sign/utils/loadClicksignScript.d.ts +0 -13
- package/dist/sign/supabase/SupabaseSingleton.d.ts +0 -34
- package/dist/sign/supabase/client.d.ts +0 -2
- package/dist/sign/supabase/legacyKeyGuard.d.ts +0 -19
- package/dist/sign/supabase/publicClient.d.ts +0 -2
- package/dist/sign/supabase/types.d.ts +0 -377
- package/dist/sign/team-selector/components/TeamSelector.d.ts +0 -24
- package/dist/sign/team-selector/index.d.ts +0 -2
- package/dist/sign/team-selector/types.d.ts +0 -10
- package/dist/sign/types/sidebar.d.ts +0 -52
- package/dist/sign/utils/color.d.ts +0 -26
- package/dist/sign/utils/formatters/currencyFormatters.d.ts +0 -1
- package/dist/sign/utils/formatters/dateFormatters.d.ts +0 -52
- package/dist/sign/utils/index.d.ts +0 -9
- package/dist/sign/utils/linkHelpers.d.ts +0 -9
- package/dist/sign/utils/load-fonts.d.ts +0 -1
- package/docs/PUBLISH.md +0 -180
- package/docs/SECURITY.md +0 -245
- package/docs/STORAGE_BUCKETS.md +0 -456
- package/docs/SUPABASE_SECRETS.md +0 -122
- package/docs/WORKSPACE_KNOWLEDGE.md +0 -189
- package/docs/design-system/buttons-actions.md +0 -433
- package/docs/design-system/charts-dashboards.md +0 -547
- package/docs/design-system/crud.md +0 -243
- package/docs/design-system/data-display.md +0 -365
- package/docs/design-system/dialogs.md +0 -590
- package/docs/design-system/domain.md +0 -671
- package/docs/design-system/examples.md +0 -275
- package/docs/design-system/foundation.md +0 -82
- package/docs/design-system/infra-utils.md +0 -36
- package/docs/design-system/inputs.md +0 -561
- package/docs/design-system/layout.md +0 -351
- package/docs/design-system/navigation.md +0 -609
- package/docs/design-system/notifications-feedback.md +0 -139
- package/docs/design-system/patterns/README.md +0 -53
- package/docs/design-system/patterns/action-button.md +0 -22
- package/docs/design-system/patterns/alertdialog-deletion.md +0 -46
- package/docs/design-system/patterns/baseform-custom-fields.md +0 -59
- package/docs/design-system/patterns/baseform-usage.md +0 -42
- package/docs/design-system/patterns/body-content-scroll.md +0 -56
- package/docs/design-system/patterns/combo-tree.md +0 -23
- package/docs/design-system/patterns/components-registry.md +0 -17
- package/docs/design-system/patterns/core-providers.md +0 -258
- package/docs/design-system/patterns/crud-bulk-actions.md +0 -12
- package/docs/design-system/patterns/crud-config-props.md +0 -17
- package/docs/design-system/patterns/crud-defaults.md +0 -17
- package/docs/design-system/patterns/crud-toolbar.md +0 -28
- package/docs/design-system/patterns/delete-confirmation.md +0 -40
- package/docs/design-system/patterns/dialog-body-scroll.md +0 -26
- package/docs/design-system/patterns/dialog-structure.md +0 -32
- package/docs/design-system/patterns/dialog-variants.md +0 -41
- package/docs/design-system/patterns/feature-flags.md +0 -113
- package/docs/design-system/patterns/header-metadata.md +0 -57
- package/docs/design-system/patterns/i18n-setup.md +0 -117
- package/docs/design-system/patterns/module-access.md +0 -72
- package/docs/design-system/patterns/pagination.md +0 -27
- package/docs/design-system/patterns/single-scroll.md +0 -39
- package/docs/design-system/patterns/vite-tailwind-setup.md +0 -49
- package/docs/design-system/platform.md +0 -55
- package/docs/design-system/selectors.md +0 -481
- package/docs/design-system/tables-grids.md +0 -114
- package/docs/sql/import/00_infra.sql +0 -210
- package/docs/sql/import/validate_criteria.sql +0 -209
- package/docs/sql/import/validate_materials_services.sql +0 -216
- package/docs/sql/import/validate_occurrences.sql +0 -289
- package/docs/sql/import/validate_occurrences_categories.sql +0 -249
- package/docs/sql/import/validate_occurrences_causes_classification.sql +0 -112
- package/docs/sql/import/validate_occurrences_types.sql +0 -113
- package/docs/sql/import/validate_risks.sql +0 -221
- package/docs/sql/import/validate_risks_categories.sql +0 -231
- package/docs/sql/import/validate_risks_groups.sql +0 -194
- package/docs/sql/import/validate_suppliers.sql +0 -250
- package/docs/sql/import/validate_suppliers_categories.sql +0 -150
- package/docs/sql/import/validate_supply_types.sql +0 -165
- /package/dist/{action-plans → legacy}/components/dashboards/dashboard-panel-renderer.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/dashboards/helpers.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/dashboards/index.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/dashboards/panels/index.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/dashboards/types.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/layout/AppHeader.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/layout/sidebar-utils.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/modules/index.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/modules/modulesData.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/accordion.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/action-button.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/avatar.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/button-group.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/card.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/checkbox.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/collapsible.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/color-picker.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/disabled-menu-item.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/hover-card.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/icon-picker.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/input.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/label.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/navigation-menu.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/onboarding-dialog.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/popover.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/progress.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/radio-group.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/rich-text-editor.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/scroll-area.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/separator.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/slider.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/switch.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/table-resize-handle.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/table.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/tabs.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/textarea.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/timepicker.d.ts +0 -0
- /package/dist/{action-plans → legacy}/components/ui/typography.d.ts +0 -0
- /package/dist/{action-plans → legacy}/crud/components/ActionMenuItems.d.ts +0 -0
- /package/dist/{action-plans → legacy}/crud/components/InlineRowActions.d.ts +0 -0
- /package/dist/{action-plans → legacy}/crud/components/SelectionCheckbox.d.ts +0 -0
- /package/dist/{action-plans → legacy}/crud/components/TableRowActions.d.ts +0 -0
- /package/dist/{action-plans → legacy}/crud/hooks/useColumnDragReorder.d.ts +0 -0
- /package/dist/{action-plans → legacy}/crud/primitives/index.d.ts +0 -0
- /package/dist/{action-plans → legacy}/crud/primitives/types.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useActiveModules.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useAliasFromUrl.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useColumnResize.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useDebounce.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useDerivedContractedModules.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useI18nFormatters.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useMediaQuery.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/usePageTitle.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/usePermissionQuery.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useRowResize.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useUpdatesNotification.d.ts +0 -0
- /package/dist/{action-plans → legacy}/hooks/useWizard.d.ts +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* forlogic-ds-knowledge — sincroniza o knowledge do Design System (forlogic-core)
|
|
4
|
+
* em qualquer projeto alvo, e o mantém atualizado conforme o DS evolui.
|
|
5
|
+
*
|
|
6
|
+
* Uso (projeto consumidor):
|
|
7
|
+
* npx forlogic-ds-knowledge # sincroniza a partir da versão instalada
|
|
8
|
+
* npx forlogic-ds-knowledge --out . # define a pasta de destino
|
|
9
|
+
* npx forlogic-ds-knowledge --latest # instala forlogic-core@latest e sincroniza
|
|
10
|
+
* npx forlogic-ds-knowledge --check # CI: falha se estiver desatualizado
|
|
11
|
+
* npx forlogic-ds-knowledge --compact # copia só o arquivo compacto (<10k)
|
|
12
|
+
* npx forlogic-ds-knowledge --silent # útil em postinstall
|
|
13
|
+
*
|
|
14
|
+
* Uso (repo do DS): regenera docs/DS_KNOWLEDGE.md antes de sincronizar.
|
|
15
|
+
*/
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
import { execFileSync } from 'node:child_process';
|
|
18
|
+
import fs from 'node:fs';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
|
|
21
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
22
|
+
const pkgRoot = path.resolve(here, '..');
|
|
23
|
+
const cwd = process.cwd();
|
|
24
|
+
|
|
25
|
+
const ALL_FILES = [
|
|
26
|
+
{ from: 'docs/DS_KNOWLEDGE.md', to: 'DS_KNOWLEDGE.md' },
|
|
27
|
+
{ from: 'docs/DS_KNOWLEDGE_COMPACT.md', to: 'DS_KNOWLEDGE_COMPACT.md' },
|
|
28
|
+
{ from: 'docs/design-system/knowledge/RULES.md', to: 'DS_RULES.md' },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const args = process.argv.slice(2);
|
|
32
|
+
const has = flag => args.includes(flag);
|
|
33
|
+
const check = has('--check');
|
|
34
|
+
const silent = has('--silent');
|
|
35
|
+
const latest = has('--latest');
|
|
36
|
+
const compact = has('--compact');
|
|
37
|
+
const outIdx = args.indexOf('--out');
|
|
38
|
+
const outDir = path.resolve(cwd, outIdx !== -1 && args[outIdx + 1] ? args[outIdx + 1] : 'docs/forlogic-core');
|
|
39
|
+
const FILES = compact ? ALL_FILES.filter(file => file.to === 'DS_KNOWLEDGE_COMPACT.md') : ALL_FILES;
|
|
40
|
+
|
|
41
|
+
const log = (...a) => !silent && console.log(...a);
|
|
42
|
+
const readJson = p => JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
43
|
+
|
|
44
|
+
/** Origem dos arquivos: o repo do DS (se rodando nele) ou o pacote instalado. */
|
|
45
|
+
function resolveSource() {
|
|
46
|
+
const isDsRepo =
|
|
47
|
+
fs.existsSync(path.join(cwd, 'scripts/generate-ds-knowledge.ts')) &&
|
|
48
|
+
fs.existsSync(path.join(cwd, 'lib/exports'));
|
|
49
|
+
|
|
50
|
+
if (isDsRepo) {
|
|
51
|
+
if (!check) {
|
|
52
|
+
log('[ds-knowledge] repo do DS detectado — regenerando DS_KNOWLEDGE.md...');
|
|
53
|
+
try {
|
|
54
|
+
execFileSync('npx', ['tsx', 'scripts/generate-ds-knowledge.ts'], { cwd, stdio: silent ? 'ignore' : 'inherit' });
|
|
55
|
+
} catch {
|
|
56
|
+
console.error('[ds-knowledge] falha ao regenerar (segue com o arquivo atual).');
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return cwd;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (latest) {
|
|
63
|
+
log('[ds-knowledge] instalando forlogic-core@latest...');
|
|
64
|
+
try {
|
|
65
|
+
execFileSync('npm', ['install', 'forlogic-core@latest', '--no-audit', '--no-fund'], {
|
|
66
|
+
cwd,
|
|
67
|
+
stdio: silent ? 'ignore' : 'inherit',
|
|
68
|
+
});
|
|
69
|
+
} catch {
|
|
70
|
+
console.error('[ds-knowledge] não foi possível instalar forlogic-core@latest.');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const installed = path.join(cwd, 'node_modules/forlogic-core');
|
|
75
|
+
return fs.existsSync(path.join(installed, 'docs/DS_KNOWLEDGE_COMPACT.md')) ? installed : pkgRoot;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const source = resolveSource();
|
|
79
|
+
let version = 'unknown';
|
|
80
|
+
try {
|
|
81
|
+
version = readJson(path.join(source, 'package.json')).version;
|
|
82
|
+
} catch {
|
|
83
|
+
/* noop */
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
let stale = false;
|
|
87
|
+
if (!check) fs.mkdirSync(outDir, { recursive: true });
|
|
88
|
+
|
|
89
|
+
for (const file of FILES) {
|
|
90
|
+
const src = path.join(source, file.from);
|
|
91
|
+
if (!fs.existsSync(src)) {
|
|
92
|
+
console.error(`[ds-knowledge] arquivo ausente na origem: ${file.from}`);
|
|
93
|
+
process.exitCode = 1;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const banner = `<!-- GERADO por forlogic-core@${version} — NÃO EDITAR. Rode: npx forlogic-ds-knowledge -->\n\n`;
|
|
97
|
+
const content = banner + fs.readFileSync(src, 'utf8');
|
|
98
|
+
const dest = path.join(outDir, file.to);
|
|
99
|
+
const rel = path.relative(cwd, dest);
|
|
100
|
+
const current = fs.existsSync(dest) ? fs.readFileSync(dest, 'utf8') : null;
|
|
101
|
+
|
|
102
|
+
if (check) {
|
|
103
|
+
if (current !== content) {
|
|
104
|
+
stale = true;
|
|
105
|
+
console.error(`[ds-knowledge] desatualizado: ${rel}`);
|
|
106
|
+
}
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (current === content) log(`[ds-knowledge] em dia: ${rel}`);
|
|
111
|
+
else {
|
|
112
|
+
fs.writeFileSync(dest, content);
|
|
113
|
+
log(`[ds-knowledge] atualizado: ${rel}`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (check) {
|
|
118
|
+
if (stale) {
|
|
119
|
+
console.error('[ds-knowledge] rode "npx forlogic-ds-knowledge" e commite as mudanças.');
|
|
120
|
+
process.exit(1);
|
|
121
|
+
}
|
|
122
|
+
log('[ds-knowledge] knowledge em dia.');
|
|
123
|
+
} else {
|
|
124
|
+
fs.writeFileSync(
|
|
125
|
+
path.join(outDir, '.ds-knowledge.json'),
|
|
126
|
+
`${JSON.stringify({ package: 'forlogic-core', version, mode: compact ? 'compact' : 'full', syncedAt: new Date().toISOString() }, null, 2)}\n`,
|
|
127
|
+
);
|
|
128
|
+
log(`[ds-knowledge] forlogic-core@${version} → ${path.relative(cwd, outDir) || '.'}`);
|
|
129
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{StatusBadge as n,Label as i,cn as s,Input as r,Select as l,SelectTrigger as c,SelectValue as d,SelectContent as o,SelectItem as m,DatePicker as u,Textarea as p,Dialog as h,DialogContent as g,DialogHeader as f,DialogTitle as v,DialogFooter as x,Button as N,Progress as b,DropdownMenu as y,DropdownMenuTrigger as C,ActionButton as w,DropdownMenuContent as _,DropdownMenuItem as D,Badge as S,DropdownMenuSeparator as k,LoadingState as P,Tabs as A,TabsList as F,TabsTrigger as I,TabsContent as E}from"forlogic-core";import{X as L,Pause as R,CheckCircle2 as j,ShieldCheck as B,Play as z,Clock as T,Plus as $,MessageSquare as V,Calendar as M,Smartphone as U,Paperclip as O,ArrowLeft as q,MoreVertical as W}from"lucide-react";import H from"i18next";import G,{useState as K,useEffect as J,useCallback as Q,useRef as X}from"react";import{useTranslation as Y}from"react-i18next";var Z=(e=>(e[e.waitingStart=1]="waitingStart",e[e.running=2]="running",e[e.effectivenessCheck=3]="effectivenessCheck",e[e.done=4]="done",e[e.suspended=5]="suspended",e[e.canceled=6]="canceled",e))(Z||{}),ee=(e=>(e[e.low=0]="low",e[e.medium=1]="medium",e[e.high=2]="high",e))(ee||{}),ae=(e=>(e[e.plan=2]="plan",e[e.occurrence=3]="occurrence",e[e.risk=4]="risk",e[e.decisions=5]="decisions",e[e.audit=6]="audit",e[e.strategyExtension=7]="strategyExtension",e[e.standardization=8]="standardization",e[e.supplier=9]="supplier",e[e.auditItems=10]="auditItems",e))(ae||{}),te=(e=>(e[e.currentProgress=1]="currentProgress",e[e.cumulativeProgress=2]="cumulativeProgress",e))(te||{}),ne=(e=>(e.uploading="uploading",e.waiting="waiting",e.done="done",e.error="error",e.canceled="canceled",e.duplicateItem="duplicateItem",e))(ne||{});const ie={[Z.waitingStart]:"#D6D6D6",[Z.running]:"#DAE9F4",[Z.effectivenessCheck]:"#1B75BB29",[Z.done]:"#DDEECA",[Z.suspended]:"#FFF2D6",[Z.canceled]:"#F4433629"},se={[Z.waitingStart]:"#666666",[Z.running]:"#1B75BB",[Z.effectivenessCheck]:"#1B75BB",[Z.done]:"#4CAF50",[Z.suspended]:"#FF9800",[Z.canceled]:"#F44336"},re={[Z.waitingStart]:"waiting-start",[Z.running]:"running",[Z.effectivenessCheck]:"effectiveness-check",[Z.done]:"done",[Z.suspended]:"suspended",[Z.canceled]:"canceled"};function le(){return{[Z.waitingStart]:H.t("ap_status_waiting_start"),[Z.running]:H.t("ap_status_running"),[Z.effectivenessCheck]:H.t("ap_status_effectiveness_check"),[Z.done]:H.t("ap_status_done"),[Z.suspended]:H.t("ap_status_suspended"),[Z.canceled]:H.t("ap_status_canceled")}}const ce=new Proxy({},{get:(e,a)=>{if("symbol"==typeof a)return;return le()[a]}});function de(){return[{id:"immediate",label:H.t("ap_type_immediate")},{id:"corrective",label:H.t("ap_type_corrective")},{id:"preventive",label:H.t("ap_type_preventive")},{id:"improvement",label:H.t("ap_type_improvement")},{id:"standardization",label:H.t("ap_type_standardization")}]}const oe=[{id:"immediate",label:"Imediata"},{id:"corrective",label:"Corretiva"},{id:"preventive",label:"Preventiva"},{id:"improvement",label:"Oportunidade de Melhoria"},{id:"standardization",label:"Padronização"}];function me(){return[{id:ee.low,label:H.t("ap_priority_low"),color:"#4CAF50"},{id:ee.medium,label:H.t("ap_priority_medium"),color:"#FF9800"},{id:ee.high,label:H.t("ap_priority_high"),color:"#F44336"}]}const ue=[{id:ee.low,label:"Baixa",color:"#4CAF50"},{id:ee.medium,label:"Média",color:"#FF9800"},{id:ee.high,label:"Alta",color:"#F44336"}],pe=[Z.done,Z.canceled],he=[Z.waitingStart,Z.running,Z.effectivenessCheck,Z.suspended];function ge(e){const{actionPlan:a,isNew:t=!1,config:n,onSave:i,onCancel:s,onDelete:r,onChangeStatus:l}=e,[c,d]=K({formData:a||{},isLoading:e.isLoading||!1,isSaving:!1,activeTab:"general",isFormDisabled:!1});J(()=>{a&&d(e=>({...e,formData:a,isFormDisabled:n?.disableFields||pe.includes(a.statusId)}))},[a,n?.disableFields]),J(()=>{d(a=>({...a,isLoading:e.isLoading||!1}))},[e.isLoading]);const o=Q((e,a)=>{d(t=>({...t,formData:{...t.formData,[e]:a}}))},[]),m=Q(e=>{d(a=>({...a,activeTab:e}))},[]),u=Q(async()=>{if(i){d(e=>({...e,isSaving:!0}));try{await i(c.formData)}finally{d(e=>({...e,isSaving:!1}))}}},[i,c.formData]),p=Q(async e=>{if(l&&c.formData.id){d(e=>({...e,isLoading:!0}));try{await l(c.formData.id,e)}finally{d(e=>({...e,isLoading:!1}))}}},[l,c.formData.id]),h=Q(async()=>{if(r&&c.formData.id){d(e=>({...e,isLoading:!0}));try{await r(c.formData.id)}finally{d(e=>({...e,isLoading:!1}))}}},[r,c.formData.id]);return{formData:c.formData,isLoading:c.isLoading,isSaving:c.isSaving,activeTab:c.activeTab,isFormDisabled:c.isFormDisabled,updateField:o,setActiveTab:m,save:u,changeStatus:p,remove:h,cancel:s}}const fe={[Z.waitingStart]:{label:"",color:"#8B7355",icon:T},[Z.running]:{label:"",color:"#2E7D5B",icon:z},[Z.effectivenessCheck]:{label:"",color:"#4A6FA5",icon:B},[Z.done]:{label:"",color:"#3D7A40",icon:j},[Z.suspended]:{label:"",color:"#6B7280",icon:R},[Z.canceled]:{label:"",color:"#B44A4A",icon:L}};function ve({status:a,labels:t,className:i,size:s,showIcon:r,variant:l}){const c=le(),d=fe[a];if(!d)return null;const o=t?.[a]||c[a]||"";return e(n,{label:o,color:d.color,icon:d.icon,size:s,showIcon:r,variant:l,className:i})}function xe({formData:t,updateField:n,disabled:h=!1,users:g=[],places:f=[],actionTypes:v,causes:x=[],parentActions:N=[],config:b}){const{t:y}=Y(),C=b?.requiredFields,w=v||oe,_=e=>{if(b?.hiddenFields?.includes(e))return!1;if(b?.visibleFields&&b.visibleFields.length>0)return b.visibleFields.includes(e);const a=`${e}Visible`;return!C||!(a in C)||!1!==C[a]},D=e=>C?!!C[e]:"name"===e,S=G.useMemo(()=>{if(t.startDate&&t.endDate){const e=new Date(t.startDate),a=new Date(t.endDate).getTime()-e.getTime();return Math.max(0,Math.ceil(a/864e5))}return t.duration||0},[t.startDate,t.endDate,t.duration]);return a("div",{className:"space-y-6 p-1",children:[a("div",{className:"space-y-2",children:[e(i,{className:s(D("name")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Nome"}),e(r,{value:t.name||"",onChange:e=>n("name",e.target.value),maxLength:500,disabled:h,placeholder:y("ap_plan_name_placeholder")})]}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[_("responsibleWho")&&a("div",{className:"space-y-2",children:[e(i,{className:s(D("responsibleWho")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Responsável"}),a(l,{value:t.responsibleId||"",onValueChange:e=>n("responsibleId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_responsible")})}),e(o,{children:g.map(a=>e(m,{value:a.id,children:a.name},a.id))})]})]}),_("checkerWho")&&a("div",{className:"space-y-2",children:[e(i,{className:s(D("checkerWho")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Verificador"}),a(l,{value:t.checkerId||"",onValueChange:e=>n("checkerId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_checker")})}),e(o,{children:g.map(a=>e(m,{value:a.id,children:a.name},a.id))})]})]})]}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[_("place")&&a("div",{className:"space-y-2",children:[e(i,{className:s(D("place")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Local"}),a(l,{value:t.placeId||"",onValueChange:e=>n("placeId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_place")})}),e(o,{children:Ne(f).map(a=>e(m,{value:a.id,children:a.name},a.id))})]})]}),_("planType")&&a("div",{className:"space-y-2",children:[e(i,{className:s(D("planType")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Tipo de Ação"}),a(l,{value:t.typeId||"",onValueChange:e=>n("typeId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_type")})}),e(o,{children:w.map(a=>e(m,{value:a.id,children:a.label},a.id))})]})]})]}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[_("priority")&&a("div",{className:"space-y-2",children:[e(i,{className:s(D("priority")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Prioridade"}),a(l,{value:t.priorityType?.toString()||"",onValueChange:e=>n("priorityType",Number(e)),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_priority")})}),e(o,{children:ue.map(t=>e(m,{value:t.id.toString(),children:a("span",{className:"flex items-center gap-2",children:[e("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:t.color}}),t.label]})},t.id))})]})]}),N.length>0&&a("div",{className:"space-y-2",children:[e(i,{children:y("ap_belongs_to")}),a(l,{value:t.parentId||"",onValueChange:e=>n("parentId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_parent")})}),e(o,{children:N.map(a=>e(m,{value:a.id,children:a.label},a.id))})]})]})]}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[_("startDate")&&a("div",{className:"space-y-2",children:[e(i,{className:s(D("startDate")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Data de Início"}),e(u,{date:t.startDate?new Date(t.startDate):void 0,onDateChange:e=>n("startDate",e||null),disabled:h,placeholder:y("ap_select_date")})]}),_("endDate")&&a("div",{className:"space-y-2",children:[e(i,{className:s(D("endDate")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Data de Término"}),e(u,{date:t.endDate?new Date(t.endDate):void 0,onDateChange:e=>n("endDate",e||null),disabled:h,placeholder:y("ap_select_date"),disabledDates:t.startDate?e=>e<new Date(t.startDate):void 0})]}),a("div",{className:"space-y-2",children:[e(i,{children:y("ap_duration_days")}),e(r,{type:"number",value:S,disabled:!0,className:"bg-muted"})]})]}),_("estimatedCost")&&a("div",{className:"space-y-2 max-w-xs",children:[e(i,{className:s(D("estimatedCost")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Custo Estimado"}),a("div",{className:"relative",children:[e("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground text-sm",children:"R$"}),e(r,{type:"number",min:0,step:.01,value:t.estimatedCost||"",onChange:e=>n("estimatedCost",Number(e.target.value)),disabled:h,className:"pl-9",placeholder:"0,00"})]})]}),_("cause")&&x.length>0&&a("div",{className:"space-y-2",children:[e(i,{children:"Causa"}),a(l,{value:t.causeId||"",onValueChange:e=>n("causeId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_cause")})}),e(o,{children:x.map(a=>e(m,{value:a.id,children:a.label},a.id))})]})]}),_("description")&&a("div",{className:"space-y-2",children:[e(i,{className:s(D("description")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Descrição"}),e(p,{value:t.description||"",onChange:e=>n("description",e.target.value),maxLength:4e3,disabled:h,rows:4,placeholder:y("ap_description_placeholder")})]}),_("justification")&&a("div",{className:"space-y-2",children:[e(i,{className:s(D("justification")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Justificativa"}),e(p,{value:t.justification||"",onChange:e=>n("justification",e.target.value),maxLength:4e3,disabled:h,rows:4,placeholder:y("ap_justification_placeholder")})]})]})}function Ne(e,a=0){const t=[];for(const n of e)t.push({...n,depth:a}),n.children?.length&&t.push(...Ne(n.children,a+1));return t}function be(e){const{progress:a,onReportProgress:t,onEditProgress:n,onDeleteProgress:i}=e,[s,r]=K(!1),[l,c]=K(null),d=!!a&&he.includes(a.status),o=Q(async e=>{if(t&&a){r(!0);try{const n=100===e.percentProgress;await t({id:a.id,...e,conclude:n})}finally{r(!1)}}},[t,a]),m=Q(async e=>{if(n){r(!0);try{await n(e)}finally{r(!1),c(null)}}},[n]),u=Q(async e=>{if(i){r(!0);try{await i(e)}finally{r(!1)}}},[i]);return{progress:a,canReportProgress:d,isSubmitting:s,editingReport:l,setEditingReport:c,reportProgress:o,editProgress:m,deleteProgress:u}}function ye(e){if(!e)return"";let a=(e||"").trim();if(!a)return"00:00";if(a.includes(":")){const e=a.split(":");if(e.length>=2){const a=e[0].replace(/\D/g,""),t=e[1].replace(/\D/g,"");let n=parseInt(a)||0,i=parseInt(t)||0;return n+=Math.floor(i/60),i%=60,`${n.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}}if(a=a.replace(/\D/g,""),!a)return"00:00";let t=0,n=0;return 4===a.length?(t=parseInt(a.substring(0,2))||0,n=parseInt(a.substring(2,4))||0,t+=Math.floor(n/60),n%=60):(t=parseInt(a)||0,n=0),`${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}function Ce(e){if(null==e)return"00:00";const a=String(e).replace(/\D/g,"");if(a.length<3){let e=parseInt(a)||0;const t=Math.floor(e/60);return e%=60,`${t.toString().padStart(2,"0")}:${e.toString().padStart(2,"0")}`}{const e=a.slice(-2),t=a.slice(0,-2);let n=parseInt(t)||0,i=parseInt(e)||0;return n+=Math.floor(i/60),i%=60,`${n.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}}function we(e){return 100===e?"#84c148":e>0?"#1b75bb":""}function _e({open:t,onOpenChange:n,report:s,onSave:l,isSubmitting:c=!1}){const{t:d}=Y(),[o,m]=K(s?.percentProgress||0),[u,b]=K(s?.timeProgress||""),[y,C]=K(s?.comments||""),w=o!==(s?.percentProgress??0)||u!==(s?.timeProgress??"")||y!==(s?.comments??"");G.useEffect(()=>{s&&(m(s.percentProgress),b(s.timeProgress||""),C(s.comments||""))},[s]);return e(h,{open:t,onOpenChange:n,children:a(g,{className:"sm:max-w-md",variant:"form",isDirty:w,children:[e(f,{children:e(v,{children:d("ap_edit_progress")})}),a("div",{className:"space-y-4 py-4",children:[a("div",{className:"space-y-2",children:[e(i,{children:d("ap_progress_percent")}),e(r,{type:"number",min:0,max:100,value:o,onChange:e=>m(Number(e.target.value))})]}),a("div",{className:"space-y-2",children:[e(i,{children:d("ap_time_spent")}),e(r,{value:u,onChange:e=>b(e.target.value),onBlur:()=>b(ye(u)||""),placeholder:"00:00"})]}),a("div",{className:"space-y-2",children:[e(i,{children:d("ap_comments")}),e(p,{value:y,onChange:e=>C(e.target.value),rows:3,maxLength:4e3})]})]}),a(x,{children:[e(N,{variant:"outline",onClick:()=>n(!1),disabled:c,children:"Cancelar"}),e(N,{onClick:()=>{s&&l({...s,percentProgress:o,timeProgress:ye(u)||"00:00",comments:y})},disabled:c,children:c?"Salvando...":"Salvar"})]})]})})}function De(t){const{t:n}=Y(),{progress:s,canReportProgress:l,isSubmitting:c,editingReport:d,setEditingReport:o,reportProgress:m,editProgress:u,deleteProgress:h}=be(t),[g,f]=K(""),[v,x]=K(""),[y,C]=K("");if(!s)return e("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:"Sem dados de progresso disponíveis"});const w=we(s.percentProgress),_=!g,D=!g&&!v&&!y;return a("div",{className:"space-y-6 p-1",children:[a("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[a("div",{className:"flex items-center justify-between text-sm",children:[e("span",{className:"font-medium",children:n("ap_overall_progress")}),a("span",{className:"font-semibold",style:{color:w||void 0},children:[s.percentProgress,"%"]})]}),e(b,{value:s.percentProgress,className:"h-3"}),s.timeProgress&&a("div",{className:"text-xs text-muted-foreground",children:["Tempo total: ",Ce(s.timeProgress)]})]}),l&&a("div",{className:"rounded-lg border bg-card p-4 space-y-4",children:[e("h4",{className:"text-sm font-medium",children:n("ap_report_progress")}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a("div",{className:"space-y-2",children:[e(i,{children:n("ap_progress_percent")}),e(r,{type:"number",min:0,max:100,value:g,onChange:e=>f(e.target.value),placeholder:"0"})]}),a("div",{className:"space-y-2",children:[e(i,{children:n("ap_time_spent")}),e(r,{value:v,onChange:e=>x(e.target.value),onBlur:()=>x(ye(v)||""),placeholder:"00:00"})]})]}),a("div",{className:"space-y-2",children:[e(i,{children:n("ap_comments")}),e(p,{value:y,onChange:e=>C(e.target.value),rows:3,maxLength:4e3,placeholder:n("ap_progress_comment_placeholder")})]}),a("div",{className:"flex gap-2 justify-end",children:[e(N,{variant:"outline",size:"sm",onClick:()=>{f(""),x(""),C("")},disabled:D||c,children:"Limpar"}),e(N,{size:"sm",onClick:async()=>{const e=Number(g);(e||0===e)&&(await m({percentProgress:e,timeProgress:ye(v)||"00:00",comments:y}),f(""),x(""),C(""))},disabled:_||c,children:c?"Reportando...":"Reportar"})]})]}),s.reports.length>0&&a("div",{className:"space-y-3",children:[e("h4",{className:"text-sm font-medium",children:n("ap_reports_history")}),e("div",{className:"space-y-2",children:s.reports.map(a=>e(Se,{report:a,onEdit:()=>o(a),onDelete:()=>h(a.id),disabled:!l},a.id))})]}),e(_e,{open:!!d,onOpenChange:e=>!e&&o(null),report:d,onSave:u,isSubmitting:c})]})}function Se({report:t,onEdit:n,onDelete:i,disabled:s}){const r=t.date?new Date(t.date):null,l=we(t.percentProgress);return a("div",{className:"flex items-start gap-3 rounded-lg border bg-card p-3",children:[e("div",{className:"flex-shrink-0 h-8 w-8 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground",children:t.userName?.charAt(0)?.toUpperCase()||"?"}),a("div",{className:"flex-1 min-w-0 space-y-1",children:[a("div",{className:"flex items-center gap-2 text-sm",children:[e("span",{className:"font-medium truncate",children:t.userName}),r&&e("span",{className:"text-xs text-muted-foreground",children:r.toLocaleDateString("pt-BR")})]}),a("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[a("span",{style:{color:l||void 0},className:"font-semibold",children:[t.percentProgress,"%"]}),t.timeProgress&&a("span",{children:["Tempo: ",Ce(t.timeProgress)]})]}),t.comments&&e("p",{className:"text-xs text-muted-foreground mt-1",children:t.comments})]}),!s&&a(y,{children:[e(C,{asChild:!0,children:e(w,{})}),a(_,{align:"end",children:[e(D,{onClick:n,children:H.t("edit")}),e(D,{className:"text-destructive",onClick:i,children:H.t("ap_delete")})]})]})]})}function ke({predecessors:t=[],availablePredecessors:n=[],onAdd:s,onRemove:r,disabled:u=!1}){const{t:p}=Y(),[h,g]=G.useState(""),f=n.filter(e=>!t.some(a=>a.predecessorId===e.id));return a("div",{className:"space-y-6 p-1",children:[!u&&f.length>0&&a("div",{className:"flex items-end gap-3",children:[a("div",{className:"flex-1 space-y-2",children:[e(i,{children:p("ap_add_predecessor")}),a(l,{value:h,onValueChange:g,children:[e(c,{children:e(d,{placeholder:p("ap_select_action")})}),e(o,{children:f.map(a=>e(m,{value:a.id,children:a.label},a.id))})]})]}),a(N,{size:"sm",onClick:()=>{h&&s&&(s(h),g(""))},disabled:!h,children:[e($,{className:"h-4 w-4 mr-1"}),"Adicionar"]})]}),t.length>0?e("div",{className:"space-y-2",children:t.map(t=>a("div",{className:"flex items-center justify-between rounded-lg border bg-card p-3",children:[a("div",{className:"flex items-center gap-3",children:[t.predecessorCode&&e("span",{className:"text-xs text-muted-foreground font-mono",children:t.predecessorCode}),e("span",{className:"text-sm font-medium",children:t.predecessorName}),null!=t.predecessorStatus&&e(ve,{status:t.predecessorStatus})]}),!u&&r&&a(y,{children:[e(C,{asChild:!0,children:e(w,{})}),e(_,{align:"end",children:e(D,{className:"text-destructive",onClick:()=>r(t.predecessorId),children:"Remover"})})]})]},t.id))}):e("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Nenhum predecessor adicionado"})]})}function Pe({costs:t=[],onAdd:n,onEdit:s,onDelete:l,disabled:c=!1}){const{t:d}=Y(),[o,m]=K(""),[u,p]=K(""),h=t.reduce((e,a)=>e+(a.value||0),0);return a("div",{className:"space-y-6 p-1",children:[a("div",{className:"rounded-lg border bg-card p-4 flex items-center justify-between",children:[e("span",{className:"text-sm font-medium",children:d("ap_total_cost")}),a("span",{className:"text-lg font-semibold text-foreground",children:["R$ ",h.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),!c&&n&&a("div",{className:"rounded-lg border bg-card p-4 space-y-4",children:[e("h4",{className:"text-sm font-medium",children:d("ap_add_cost")}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a("div",{className:"space-y-2",children:[e(i,{children:"Descrição"}),e(r,{value:o,onChange:e=>m(e.target.value),placeholder:d("ap_cost_description")})]}),a("div",{className:"space-y-2",children:[e(i,{children:"Valor (R$)"}),e(r,{type:"number",min:0,step:.01,value:u,onChange:e=>p(e.target.value),placeholder:"0,00"})]})]}),e("div",{className:"flex justify-end",children:a(N,{size:"sm",onClick:()=>{o&&u&&n&&(n({description:o,value:Number(u),date:(new Date).toISOString()}),m(""),p(""))},disabled:!o||!u,children:[e($,{className:"h-4 w-4 mr-1"}),"Adicionar"]})})]}),t.length>0?e("div",{className:"space-y-2",children:t.map(t=>a("div",{className:"flex items-center justify-between rounded-lg border bg-card p-3",children:[a("div",{className:"flex-1 min-w-0",children:[e("p",{className:"text-sm font-medium truncate",children:t.description}),t.date&&e("p",{className:"text-xs text-muted-foreground",children:new Date(t.date).toLocaleDateString("pt-BR")})]}),a("div",{className:"flex items-center gap-3",children:[a("span",{className:"text-sm font-semibold whitespace-nowrap",children:["R$ ",t.value.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]}),!c&&(s||l)&&a(y,{children:[e(C,{asChild:!0,children:e(w,{})}),a(_,{align:"end",children:[s&&e(D,{onClick:()=>s(t),children:d("edit")}),l&&e(D,{className:"text-destructive",onClick:()=>l(t.id),children:d("ap_delete")})]})]})]})]},t.id))}):e("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Nenhum custo registrado"})]})}function Ae({comments:t=[],currentUserId:n,onAdd:i,onEdit:s,onDelete:r,disabled:l=!1,maxLength:c=4e3}){const{t:d}=Y(),[o,m]=K(""),[u,h]=K(!1),[g,f]=K(null),[v,x]=K(""),b=()=>{f(null),x("")};return a("div",{className:"space-y-6 p-1",children:[!l&&i&&a("div",{className:"space-y-3",children:[e(p,{value:o,onChange:e=>m(e.target.value),placeholder:d("ap_add_comment_placeholder"),maxLength:c,rows:3}),a("div",{className:"flex items-center justify-between",children:[c&&a("span",{className:"text-xs text-muted-foreground",children:[o.length,"/",c]}),a("div",{className:"flex gap-2 ml-auto",children:[e(N,{variant:"outline",size:"sm",onClick:()=>m(""),disabled:!o||u,children:"Limpar"}),e(N,{size:"sm",onClick:async()=>{if(o.trim()&&i){h(!0);try{await i(o),m("")}finally{h(!1)}}},disabled:!o.trim()||u,children:u?"Enviando...":"Comentar"})]})]})]}),a("div",{className:"space-y-1",children:[t.length>0?a("div",{className:"flex items-center gap-2 mb-3",children:[e("span",{className:"text-sm font-medium",children:d("ap_comments")}),e(S,{variant:"info",className:"text-[10px] px-1.5 py-0",children:t.length})]}):a("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e(V,{className:"h-8 w-8 mb-2 opacity-50"}),e("p",{className:"text-sm",children:"Nenhum comentário adicionado"})]}),t.map(t=>a("div",{className:"flex gap-3 rounded-lg border bg-card p-3",children:[e("div",{className:"flex-shrink-0 h-8 w-8 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground overflow-hidden",children:t.userPhotoUrl?e("img",{src:t.userPhotoUrl,alt:t.userName,className:"h-full w-full object-cover"}):t.userName?.charAt(0)?.toUpperCase()||"?"}),a("div",{className:"flex-1 min-w-0 space-y-1",children:[a("div",{className:"flex items-center gap-2 text-sm",children:[e("span",{className:"font-medium truncate",children:t.userName}),t.userEmail&&e("span",{className:"text-xs text-muted-foreground truncate",children:t.userEmail}),e("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:Fe(t.dateEdited||t.dateCreation)}),t.dateEdited&&e("span",{className:"text-xs text-muted-foreground italic",children:"editado"})]}),g===t.id?a("div",{className:"space-y-2",children:[e(p,{value:v,onChange:e=>x(e.target.value),maxLength:c,rows:3}),a("div",{className:"flex gap-2 justify-end",children:[e(N,{variant:"outline",size:"sm",onClick:b,disabled:u,children:"Cancelar"}),e(N,{size:"sm",onClick:()=>(async e=>{if(v.trim()&&s){h(!0);try{await s({...e,text:v,stringText:v}),f(null),x("")}finally{h(!1)}}})(t),disabled:!v.trim()||u,children:u?"Salvando...":"Salvar"})]})]}):e("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:t.stringText||t.text})]}),!l&&n===t.userId&&g!==t.id&&a(y,{children:[e(C,{asChild:!0,children:e(w,{})}),a(_,{align:"end",children:[s&&e(D,{onClick:()=>(e=>{f(e.id),x(e.stringText||e.text)})(t),children:d("edit")}),r&&e(D,{className:"text-destructive",onClick:()=>(async e=>{if(r){h(!0);try{await r(e)}finally{h(!1)}}})(t.id),children:"Excluir"})]})]})]},t.id))]})]})}function Fe(e){const{t:a}=Y();if(!e)return"";const t=new Date(e);return`${t.toLocaleDateString("pt-BR")} ${t.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}`}function Ie({history:t=[],isLoading:n=!1}){const{t:i}=Y();return n?e("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:"Carregando histórico..."}):0===t.length?a("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e(T,{className:"h-8 w-8 mb-2 opacity-50"}),e("p",{className:"text-sm",children:i("ap_no_history")})]}):e("div",{className:"p-1",children:a("div",{className:"relative",children:[e("div",{className:"absolute left-4 top-0 bottom-0 w-px bg-border"}),e("div",{className:"space-y-0",children:t.map((t,n)=>a("div",{className:"relative flex gap-4 pb-6 last:pb-0",children:[e("div",{className:"relative z-10 flex-shrink-0 h-8 w-8 rounded-full bg-primary/10 border-2 border-primary/30 flex items-center justify-center",children:t.icon?e("span",{className:"text-xs text-primary",children:t.icon}):e("div",{className:"h-2 w-2 rounded-full bg-primary"})}),a("div",{className:"flex-1 min-w-0 rounded-lg border bg-card p-3 space-y-2",children:[a("div",{children:[e("h4",{className:"text-sm font-medium",children:t.translateEvent||t.eventName}),t.eventDescription&&e("p",{className:"text-xs text-muted-foreground",children:t.eventDescription})]}),a("div",{className:"flex items-center gap-2",children:[e("div",{className:"flex-shrink-0 h-6 w-6 rounded-full bg-muted overflow-hidden flex items-center justify-center text-[10px] font-medium text-muted-foreground",children:t.userPhotoUrl?e("img",{src:t.userPhotoUrl,alt:t.userName,className:"h-full w-full object-cover"}):t.userName?.charAt(0)?.toUpperCase()||"?"}),a("div",{className:"min-w-0",children:[e("span",{className:"text-xs font-medium truncate block",children:t.userName}),t.userEmail&&e("span",{className:"text-[10px] text-muted-foreground truncate block",children:t.userEmail})]})]}),a("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[a("div",{className:"flex items-center gap-1",children:[e(M,{className:"h-3 w-3"}),e("span",{children:Ee(t.date)})]}),a("div",{className:"flex items-center gap-1",children:[e(T,{className:"h-3 w-3"}),e("span",{children:Le(t.date)})]}),t.isMobileRequest&&a("div",{className:"flex items-center gap-1",children:[e(U,{className:"h-3 w-3"}),e("span",{children:i("ap_via_app")})]})]})]})]},t.id))})]})})}function Ee(e){const{t:a}=Y();return new Date(e).toLocaleDateString("pt-BR")}function Le(e){const{t:a}=Y();return new Date(e).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}function Re({attachments:n=[],onUpload:i,onDelete:r,onRename:l,onDownload:c,onView:d,disabled:o=!1}){const{t:m}=Y(),u=X(null),[p,h]=K(null),[g,f]=K(""),v=async e=>{g.trim()&&l&&(await l(e.id,g),h(null),f(""))},x=()=>{h(null),f("")};return a("div",{className:"space-y-4 p-1",children:[!o&&i&&a(t,{children:[e("input",{ref:u,type:"file",multiple:!0,className:"hidden",onChange:e=>{const a=e.target.files;if(a&&i){for(let e=0;e<a.length;e++){const t=a.item(e);t&&i(t)}u.current&&(u.current.value="")}}}),a(N,{size:"sm",onClick:()=>u.current?.click(),children:[e($,{className:"h-4 w-4 mr-1"}),"Adicionar anexo"]})]}),n.length>0?e("div",{className:"space-y-2",children:n.map(n=>a("div",{className:s("flex items-center gap-3 rounded-lg border bg-card p-3",n.status===ne.error&&"border-destructive/50 bg-destructive/5",n.status===ne.canceled&&"opacity-50"),children:[e("div",{className:"flex-shrink-0 h-9 w-9 rounded bg-muted flex items-center justify-center",children:e("span",{className:"text-[10px] font-bold uppercase text-muted-foreground",children:n.extension.replace(".","").substring(0,4)})}),a("div",{className:"flex-1 min-w-0 space-y-1",children:[p===n.id?a("div",{className:"flex items-center gap-2",children:[e("input",{className:"flex-1 text-sm border rounded px-2 py-1 bg-background",value:g,onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"===e.key&&v(n),"Escape"===e.key&&x()},autoFocus:!0}),e(N,{size:"sm",variant:"outline",onClick:x,children:m("cancel")}),e(N,{size:"sm",onClick:()=>v(n),children:m("save")})]}):e("button",{type:"button",className:"text-sm font-medium truncate block text-left hover:underline cursor-pointer",onClick:()=>d?.(n.id),children:n.name}),(n.status===ne.uploading||n.status===ne.waiting)&&e(b,{value:n.progress||0,className:"h-1.5"}),n.status===ne.error&&e("p",{className:"text-xs text-destructive",children:"Erro ao enviar arquivo"}),n.status===ne.duplicateItem&&e("p",{className:"text-xs text-warning",children:"Arquivo duplicado"}),n.status===ne.canceled&&e("p",{className:"text-xs text-muted-foreground",children:"Upload cancelado"})]}),a("div",{className:"flex items-center gap-2",children:[n.status===ne.done&&a(t,{children:[e("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:je(n.size)}),a(y,{children:[e(C,{asChild:!0,children:e(w,{})}),a(_,{align:"end",children:[l&&!o&&e(D,{onClick:()=>(e=>{const a=e.name.replace(e.extension,"");h(e.id),f(a)})(n),children:"Renomear"}),d&&e(D,{onClick:()=>d(n.id),children:"Visualizar"}),c&&e(D,{onClick:()=>c(n.id),children:"Download"}),r&&!o&&a(t,{children:[e(k,{}),e(D,{className:"text-destructive",onClick:()=>r(n.id),children:"Excluir"})]})]})]})]}),n.status===ne.uploading&&e(N,{variant:"outline",size:"sm",onClick:()=>r?.(n.id),children:"Cancelar"})]})]},n.id))}):a("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e(O,{className:"h-8 w-8 mb-2 opacity-50"}),e("p",{className:"text-sm",children:"Nenhum anexo adicionado"})]})]})}function je(e){const{t:a}=Y();if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB"][t]}`}function Be(t){const{formData:n,isLoading:i,isSaving:s,activeTab:r,isFormDisabled:l,updateField:c,setActiveTab:d,save:o,changeStatus:m,remove:u,cancel:p}=ge(t),{t:h}=Y(),{isNew:g=!1,config:f,users:v,places:x,actionTypes:b,causes:w,parentActions:S,progress:k,predecessors:L,availablePredecessors:R,costs:j,comments:B,history:z,attachments:T,attachmentsSlot:$,commentsSlot:V,historySlot:M,onAddPredecessor:U,onRemovePredecessor:O,onAddCost:H,onEditCost:G,onDeleteCost:K,onAddComment:J,onEditComment:Q,onDeleteComment:X,onUploadAttachment:ee,onDeleteAttachment:ae,onRenameAttachment:te,onDownloadAttachment:ne,onViewAttachment:ie}=t;if(i&&!n.id)return e(P,{isLoading:!0,children:e("div",{})});const se=function(e){const{t:a}=Y();if(!e)return[];return{[Z.waitingStart]:[Z.running,Z.suspended,Z.canceled],[Z.running]:[Z.effectivenessCheck,Z.done,Z.suspended,Z.canceled],[Z.effectivenessCheck]:[Z.running,Z.done,Z.suspended,Z.canceled],[Z.done]:[Z.running],[Z.suspended]:[Z.running,Z.canceled],[Z.canceled]:[Z.waitingStart]}[e]||[]}(n.statusId);return a("div",{className:"flex flex-col h-full",children:[a("div",{className:"flex items-center justify-between border-b bg-card px-6 py-4",children:[a("div",{className:"flex items-center gap-4",children:[p&&e(N,{variant:"ghost",size:"icon",onClick:p,children:e(q,{className:"h-4 w-4"})}),a("div",{className:"space-y-1",children:[a("div",{className:"flex items-center gap-3",children:[e("h1",{className:"text-lg font-semibold",children:g?h("ap_new_action"):n.name||h("ap_action_plan")}),!g&&n.statusId&&e(ve,{status:n.statusId})]}),n.code&&e("p",{className:"text-xs text-muted-foreground font-mono",children:n.code})]})]}),a("div",{className:"flex items-center gap-2",children:[!g&&se.length>0&&!l&&a(y,{children:[e(C,{asChild:!0,children:e(N,{variant:"outline",size:"sm",children:"Alterar Status"})}),e(_,{align:"end",children:se.map(a=>e(D,{onClick:()=>m(a),children:ce[a]},a))})]}),!g&&t.onDelete&&a(y,{children:[e(C,{asChild:!0,children:e(N,{variant:"ghost",size:"icon",children:e(W,{className:"h-4 w-4"})})}),e(_,{align:"end",children:e(D,{className:"text-destructive",onClick:u,children:"Excluir"})})]})]})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e("div",{className:"max-w-4xl mx-auto px-6 py-6",children:a(A,{value:r,onValueChange:d,children:[a(F,{className:"mb-6",children:[e(I,{value:"general",children:"Geral"}),!g&&e(I,{value:"progress",children:"Progresso"}),!g&&f?.enablePredecessors&&e(I,{value:"predecessors",children:h("ap_predecessors")}),!g&&f?.enableCosts&&e(I,{value:"costs",children:"Custos"}),!g&&f?.enableAttachments&&e(I,{value:"attachments",children:h("ap_attachments")}),!g&&f?.enableComments&&e(I,{value:"comments",children:h("ap_comments")}),!g&&f?.enableHistory&&e(I,{value:"history",children:"Histórico"})]}),e(E,{value:"general",children:e(xe,{formData:n,updateField:c,disabled:l,users:v,places:x,actionTypes:b,causes:w,parentActions:S,config:f})}),!g&&e(E,{value:"progress",children:e(De,{...t})}),!g&&f?.enablePredecessors&&e(E,{value:"predecessors",children:e(ke,{predecessors:L,availablePredecessors:R,onAdd:U,onRemove:O,disabled:l})}),!g&&f?.enableCosts&&e(E,{value:"costs",children:e(Pe,{costs:j,onAdd:H,onEdit:G,onDelete:K,disabled:l})}),!g&&f?.enableAttachments&&e(E,{value:"attachments",children:$||e(Re,{attachments:T,onUpload:ee,onDelete:ae,onRename:te,onDownload:ne,onView:ie,disabled:l})}),!g&&f?.enableComments&&e(E,{value:"comments",children:V||e(Ae,{comments:B,onAdd:J,onEdit:Q,onDelete:X,disabled:l})}),!g&&f?.enableHistory&&e(E,{value:"history",children:M||e(Ie,{history:z})})]})})}),a("div",{className:"flex items-center justify-end gap-3 border-t bg-card px-6 py-4",children:[p&&e(N,{variant:"outline",onClick:p,disabled:s,children:"Cancelar"}),e(N,{onClick:o,disabled:s||l,children:s?"Salvando...":"Salvar"})]})]})}export{Re as ActionPlanAttachmentsTab,Ae as ActionPlanCommentsTab,Pe as ActionPlanCostTab,xe as ActionPlanGeneralTab,Ie as ActionPlanHistoryTab,Be as ActionPlanPage,ke as ActionPlanPredecessorsTab,_e as ActionPlanProgressDialog,De as ActionPlanProgressTab,ve as ActionPlanStatusBadge,pe as CLOSED_STATUSES,oe as DEFAULT_ACTION_TYPES,ne as EAttachmentItemStatus,ae as ETaskPlanAssociationType,ee as ETaskPlanPriority,Z as ETaskPlanStatus,te as ETaskPlanTypeProgress,ue as PRIORITIES,he as PROGRESS_ALLOWED_STATUSES,ie as STATUS_COLORS,ce as STATUS_LABELS,re as STATUS_MAP,se as STATUS_TEXT_COLORS,Ce as formatTime,ye as formatTimeProgress,de as getActionTypes,me as getPriorities,we as getProgressColor,le as getStatusLabels,ge as useActionPlan,be as useActionPlanProgress};
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{StatusBadge as n,Label as s,cn as i,Input as r,Select as l,SelectTrigger as c,SelectValue as d,SelectContent as o,SelectItem as m,DatePicker as u,Textarea as p,Dialog as h,DialogContent as g,DialogHeader as f,DialogTitle as v,DialogFooter as x,Button as N,Progress as b,TableRowActions as y,Badge as w,LoadingState as D,DropdownMenu as _,DropdownMenuTrigger as C,DropdownMenuContent as S,DropdownMenuItem as k,Tabs as P,TabsList as A,TabsTrigger as F,TabsContent as I}from"forlogic-core";import{X as E,Pause as L,CheckCircle2 as j,ShieldCheck as R,Play as B,Clock as z,Plus as T,MessageSquare as $,Calendar as V,Smartphone as M,Pencil as U,Eye as O,Download as q,Paperclip as W,ArrowLeft as H,MoreVertical as G}from"lucide-react";import K from"i18next";import J,{useState as Q,useEffect as X,useCallback as Y,useRef as Z}from"react";import{useTranslation as ee}from"react-i18next";var ae=(e=>(e[e.waitingStart=1]="waitingStart",e[e.running=2]="running",e[e.effectivenessCheck=3]="effectivenessCheck",e[e.done=4]="done",e[e.suspended=5]="suspended",e[e.canceled=6]="canceled",e))(ae||{}),te=(e=>(e[e.low=0]="low",e[e.medium=1]="medium",e[e.high=2]="high",e))(te||{}),ne=(e=>(e[e.plan=2]="plan",e[e.occurrence=3]="occurrence",e[e.risk=4]="risk",e[e.decisions=5]="decisions",e[e.audit=6]="audit",e[e.strategyExtension=7]="strategyExtension",e[e.standardization=8]="standardization",e[e.supplier=9]="supplier",e[e.auditItems=10]="auditItems",e))(ne||{}),se=(e=>(e[e.currentProgress=1]="currentProgress",e[e.cumulativeProgress=2]="cumulativeProgress",e))(se||{}),ie=(e=>(e.uploading="uploading",e.waiting="waiting",e.done="done",e.error="error",e.canceled="canceled",e.duplicateItem="duplicateItem",e))(ie||{});const re={[ae.waitingStart]:"#D6D6D6",[ae.running]:"#DAE9F4",[ae.effectivenessCheck]:"#1B75BB29",[ae.done]:"#DDEECA",[ae.suspended]:"#FFF2D6",[ae.canceled]:"#F4433629"},le={[ae.waitingStart]:"#666666",[ae.running]:"#1B75BB",[ae.effectivenessCheck]:"#1B75BB",[ae.done]:"#4CAF50",[ae.suspended]:"#FF9800",[ae.canceled]:"#F44336"},ce={[ae.waitingStart]:"waiting-start",[ae.running]:"running",[ae.effectivenessCheck]:"effectiveness-check",[ae.done]:"done",[ae.suspended]:"suspended",[ae.canceled]:"canceled"};function de(){return{[ae.waitingStart]:K.t("ap_status_waiting_start"),[ae.running]:K.t("ap_status_running"),[ae.effectivenessCheck]:K.t("ap_status_effectiveness_check"),[ae.done]:K.t("ap_status_done"),[ae.suspended]:K.t("ap_status_suspended"),[ae.canceled]:K.t("ap_status_canceled")}}const oe=new Proxy({},{get:(e,a)=>{if("symbol"==typeof a)return;return de()[a]}});function me(){return[{id:"immediate",label:K.t("ap_type_immediate")},{id:"corrective",label:K.t("ap_type_corrective")},{id:"preventive",label:K.t("ap_type_preventive")},{id:"improvement",label:K.t("ap_type_improvement")},{id:"standardization",label:K.t("ap_type_standardization")}]}const ue=[{id:"immediate",label:"Imediata"},{id:"corrective",label:"Corretiva"},{id:"preventive",label:"Preventiva"},{id:"improvement",label:"Oportunidade de Melhoria"},{id:"standardization",label:"Padronização"}];function pe(){return[{id:te.low,label:K.t("ap_priority_low"),color:"#4CAF50"},{id:te.medium,label:K.t("ap_priority_medium"),color:"#FF9800"},{id:te.high,label:K.t("ap_priority_high"),color:"#F44336"}]}const he=[{id:te.low,label:"Baixa",color:"#4CAF50"},{id:te.medium,label:"Média",color:"#FF9800"},{id:te.high,label:"Alta",color:"#F44336"}],ge=[ae.done,ae.canceled],fe=[ae.waitingStart,ae.running,ae.effectivenessCheck,ae.suspended];function ve(e){const{actionPlan:a,isNew:t=!1,config:n,onSave:s,onCancel:i,onDelete:r,onChangeStatus:l}=e,[c,d]=Q({formData:a||{},isLoading:e.isLoading||!1,isSaving:!1,activeTab:"general",isFormDisabled:!1});X(()=>{a&&d(e=>({...e,formData:a,isFormDisabled:n?.disableFields||ge.includes(a.statusId)}))},[a,n?.disableFields]),X(()=>{d(a=>({...a,isLoading:e.isLoading||!1}))},[e.isLoading]);const o=Y((e,a)=>{d(t=>({...t,formData:{...t.formData,[e]:a}}))},[]),m=Y(e=>{d(a=>({...a,activeTab:e}))},[]),u=Y(async()=>{if(s){d(e=>({...e,isSaving:!0}));try{await s(c.formData)}finally{d(e=>({...e,isSaving:!1}))}}},[s,c.formData]),p=Y(async e=>{if(l&&c.formData.id){d(e=>({...e,isLoading:!0}));try{await l(c.formData.id,e)}finally{d(e=>({...e,isLoading:!1}))}}},[l,c.formData.id]),h=Y(async()=>{if(r&&c.formData.id){d(e=>({...e,isLoading:!0}));try{await r(c.formData.id)}finally{d(e=>({...e,isLoading:!1}))}}},[r,c.formData.id]);return{formData:c.formData,isLoading:c.isLoading,isSaving:c.isSaving,activeTab:c.activeTab,isFormDisabled:c.isFormDisabled,updateField:o,setActiveTab:m,save:u,changeStatus:p,remove:h,cancel:i}}const xe={[ae.waitingStart]:{label:"",color:"#8B7355",icon:z},[ae.running]:{label:"",color:"#2E7D5B",icon:B},[ae.effectivenessCheck]:{label:"",color:"#4A6FA5",icon:R},[ae.done]:{label:"",color:"#3D7A40",icon:j},[ae.suspended]:{label:"",color:"#6B7280",icon:L},[ae.canceled]:{label:"",color:"#B44A4A",icon:E}};function Ne({status:a,labels:t,className:s,size:i,showIcon:r,variant:l}){const c=de(),d=xe[a];if(!d)return null;const o=t?.[a]||c[a]||"";return e(n,{label:o,color:d.color,icon:d.icon,size:i,showIcon:r,variant:l,className:s})}function be({formData:t,updateField:n,disabled:h=!1,users:g=[],places:f=[],actionTypes:v,causes:x=[],parentActions:N=[],config:b}){const{t:y}=ee(),w=b?.requiredFields,D=v||ue,_=e=>{if(b?.hiddenFields?.includes(e))return!1;if(b?.visibleFields&&b.visibleFields.length>0)return b.visibleFields.includes(e);const a=`${e}Visible`;return!w||!(a in w)||!1!==w[a]},C=e=>w?!!w[e]:"name"===e,S=J.useMemo(()=>{if(t.startDate&&t.endDate){const e=new Date(t.startDate),a=new Date(t.endDate).getTime()-e.getTime();return Math.max(0,Math.ceil(a/864e5))}return t.duration||0},[t.startDate,t.endDate,t.duration]);return a("div",{className:"space-y-6 p-1",children:[a("div",{className:"space-y-2",children:[e(s,{className:i(C("name")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Nome"}),e(r,{value:t.name||"",onChange:e=>n("name",e.target.value),maxLength:500,disabled:h,placeholder:y("ap_plan_name_placeholder")})]}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[_("responsibleWho")&&a("div",{className:"space-y-2",children:[e(s,{className:i(C("responsibleWho")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Responsável"}),a(l,{value:t.responsibleId||"",onValueChange:e=>n("responsibleId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_responsible")})}),e(o,{children:g.map(a=>e(m,{value:a.id,children:a.name},a.id))})]})]}),_("checkerWho")&&a("div",{className:"space-y-2",children:[e(s,{className:i(C("checkerWho")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Verificador"}),a(l,{value:t.checkerId||"",onValueChange:e=>n("checkerId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_checker")})}),e(o,{children:g.map(a=>e(m,{value:a.id,children:a.name},a.id))})]})]})]}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[_("place")&&a("div",{className:"space-y-2",children:[e(s,{className:i(C("place")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Local"}),a(l,{value:t.placeId||"",onValueChange:e=>n("placeId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_place")})}),e(o,{children:ye(f).map(a=>e(m,{value:a.id,children:a.name},a.id))})]})]}),_("planType")&&a("div",{className:"space-y-2",children:[e(s,{className:i(C("planType")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Tipo de Ação"}),a(l,{value:t.typeId||"",onValueChange:e=>n("typeId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_type")})}),e(o,{children:D.map(a=>e(m,{value:a.id,children:a.label},a.id))})]})]})]}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[_("priority")&&a("div",{className:"space-y-2",children:[e(s,{className:i(C("priority")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Prioridade"}),a(l,{value:t.priorityType?.toString()||"",onValueChange:e=>n("priorityType",Number(e)),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_priority")})}),e(o,{children:he.map(t=>e(m,{value:t.id.toString(),children:a("span",{className:"flex items-center gap-2",children:[e("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:t.color}}),t.label]})},t.id))})]})]}),N.length>0&&a("div",{className:"space-y-2",children:[e(s,{children:y("ap_belongs_to")}),a(l,{value:t.parentId||"",onValueChange:e=>n("parentId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_parent")})}),e(o,{children:N.map(a=>e(m,{value:a.id,children:a.label},a.id))})]})]})]}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[_("startDate")&&a("div",{className:"space-y-2",children:[e(s,{className:i(C("startDate")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Data de Início"}),e(u,{date:t.startDate?new Date(t.startDate):void 0,onDateChange:e=>n("startDate",e||null),disabled:h,placeholder:y("ap_select_date")})]}),_("endDate")&&a("div",{className:"space-y-2",children:[e(s,{className:i(C("endDate")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Data de Término"}),e(u,{date:t.endDate?new Date(t.endDate):void 0,onDateChange:e=>n("endDate",e||null),disabled:h,placeholder:y("ap_select_date"),disabledDates:t.startDate?e=>e<new Date(t.startDate):void 0})]}),a("div",{className:"space-y-2",children:[e(s,{children:y("ap_duration_days")}),e(r,{type:"number",value:S,disabled:!0,className:"bg-muted"})]})]}),_("estimatedCost")&&a("div",{className:"space-y-2 max-w-xs",children:[e(s,{className:i(C("estimatedCost")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Custo Estimado"}),a("div",{className:"relative",children:[e("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground text-sm",children:"R$"}),e(r,{type:"number",min:0,step:.01,value:t.estimatedCost||"",onChange:e=>n("estimatedCost",Number(e.target.value)),disabled:h,className:"pl-9",placeholder:"0,00"})]})]}),_("cause")&&x.length>0&&a("div",{className:"space-y-2",children:[e(s,{children:"Causa"}),a(l,{value:t.causeId||"",onValueChange:e=>n("causeId",e),disabled:h,children:[e(c,{children:e(d,{placeholder:y("ap_select_cause")})}),e(o,{children:x.map(a=>e(m,{value:a.id,children:a.label},a.id))})]})]}),_("description")&&a("div",{className:"space-y-2",children:[e(s,{className:i(C("description")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Descrição"}),e(p,{value:t.description||"",onChange:e=>n("description",e.target.value),maxLength:4e3,disabled:h,rows:4,placeholder:y("ap_description_placeholder")})]}),_("justification")&&a("div",{className:"space-y-2",children:[e(s,{className:i(C("justification")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Justificativa"}),e(p,{value:t.justification||"",onChange:e=>n("justification",e.target.value),maxLength:4e3,disabled:h,rows:4,placeholder:y("ap_justification_placeholder")})]})]})}function ye(e,a=0){const t=[];for(const n of e)t.push({...n,depth:a}),n.children?.length&&t.push(...ye(n.children,a+1));return t}function we(e){const{progress:a,onReportProgress:t,onEditProgress:n,onDeleteProgress:s}=e,[i,r]=Q(!1),[l,c]=Q(null),d=!!a&&fe.includes(a.status),o=Y(async e=>{if(t&&a){r(!0);try{const n=100===e.percentProgress;await t({id:a.id,...e,conclude:n})}finally{r(!1)}}},[t,a]),m=Y(async e=>{if(n){r(!0);try{await n(e)}finally{r(!1),c(null)}}},[n]),u=Y(async e=>{if(s){r(!0);try{await s(e)}finally{r(!1)}}},[s]);return{progress:a,canReportProgress:d,isSubmitting:i,editingReport:l,setEditingReport:c,reportProgress:o,editProgress:m,deleteProgress:u}}function De(e){if(!e)return"";let a=(e||"").trim();if(!a)return"00:00";if(a.includes(":")){const e=a.split(":");if(e.length>=2){const a=e[0].replace(/\D/g,""),t=e[1].replace(/\D/g,"");let n=parseInt(a)||0,s=parseInt(t)||0;return n+=Math.floor(s/60),s%=60,`${n.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}}if(a=a.replace(/\D/g,""),!a)return"00:00";let t=0,n=0;return 4===a.length?(t=parseInt(a.substring(0,2))||0,n=parseInt(a.substring(2,4))||0,t+=Math.floor(n/60),n%=60):(t=parseInt(a)||0,n=0),`${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}function _e(e){if(null==e)return"00:00";const a=String(e).replace(/\D/g,"");if(a.length<3){let e=parseInt(a)||0;const t=Math.floor(e/60);return e%=60,`${t.toString().padStart(2,"0")}:${e.toString().padStart(2,"0")}`}{const e=a.slice(-2),t=a.slice(0,-2);let n=parseInt(t)||0,s=parseInt(e)||0;return n+=Math.floor(s/60),s%=60,`${n.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}}function Ce(e){return 100===e?"#84c148":e>0?"#1b75bb":""}function Se({open:t,onOpenChange:n,report:i,onSave:l,isSubmitting:c=!1}){const{t:d}=ee(),[o,m]=Q(i?.percentProgress||0),[u,b]=Q(i?.timeProgress||""),[y,w]=Q(i?.comments||""),D=o!==(i?.percentProgress??0)||u!==(i?.timeProgress??"")||y!==(i?.comments??"");J.useEffect(()=>{i&&(m(i.percentProgress),b(i.timeProgress||""),w(i.comments||""))},[i]);return e(h,{open:t,onOpenChange:n,children:a(g,{className:"sm:max-w-md",variant:"form",isDirty:D,children:[e(f,{children:e(v,{children:d("ap_edit_progress")})}),a("div",{className:"space-y-4 py-4",children:[a("div",{className:"space-y-2",children:[e(s,{children:d("ap_progress_percent")}),e(r,{type:"number",min:0,max:100,value:o,onChange:e=>m(Number(e.target.value))})]}),a("div",{className:"space-y-2",children:[e(s,{children:d("ap_time_spent")}),e(r,{value:u,onChange:e=>b(e.target.value),onBlur:()=>b(De(u)||""),placeholder:"00:00"})]}),a("div",{className:"space-y-2",children:[e(s,{children:d("ap_comments")}),e(p,{value:y,onChange:e=>w(e.target.value),rows:3,maxLength:4e3})]})]}),a(x,{children:[e(N,{variant:"secondary",onClick:()=>n(!1),disabled:c,children:"Cancelar"}),e(N,{onClick:()=>{i&&l({...i,percentProgress:o,timeProgress:De(u)||"00:00",comments:y})},disabled:c,children:c?"Salvando...":"Salvar"})]})]})})}function ke(t){const{t:n}=ee(),{progress:i,canReportProgress:l,isSubmitting:c,editingReport:d,setEditingReport:o,reportProgress:m,editProgress:u,deleteProgress:h}=we(t),[g,f]=Q(""),[v,x]=Q(""),[y,w]=Q("");if(!i)return e("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:"Sem dados de progresso disponíveis"});const D=Ce(i.percentProgress),_=!g,C=!g&&!v&&!y;return a("div",{className:"space-y-6 p-1",children:[a("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[a("div",{className:"flex items-center justify-between text-sm",children:[e("span",{className:"font-medium",children:n("ap_overall_progress")}),a("span",{className:"font-semibold",style:{color:D||void 0},children:[i.percentProgress,"%"]})]}),e(b,{value:i.percentProgress,className:"h-3"}),i.timeProgress&&a("div",{className:"text-xs text-muted-foreground",children:["Tempo total: ",_e(i.timeProgress)]})]}),l&&a("div",{className:"rounded-lg border bg-card p-4 space-y-4",children:[e("h4",{className:"text-sm font-medium",children:n("ap_report_progress")}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a("div",{className:"space-y-2",children:[e(s,{children:n("ap_progress_percent")}),e(r,{type:"number",min:0,max:100,value:g,onChange:e=>f(e.target.value),placeholder:"0"})]}),a("div",{className:"space-y-2",children:[e(s,{children:n("ap_time_spent")}),e(r,{value:v,onChange:e=>x(e.target.value),onBlur:()=>x(De(v)||""),placeholder:"00:00"})]})]}),a("div",{className:"space-y-2",children:[e(s,{children:n("ap_comments")}),e(p,{value:y,onChange:e=>w(e.target.value),rows:3,maxLength:4e3,placeholder:n("ap_progress_comment_placeholder")})]}),a("div",{className:"flex gap-2 justify-end",children:[e(N,{variant:"outline",size:"sm",onClick:()=>{f(""),x(""),w("")},disabled:C||c,children:"Limpar"}),e(N,{size:"sm",onClick:async()=>{const e=Number(g);(e||0===e)&&(await m({percentProgress:e,timeProgress:De(v)||"00:00",comments:y}),f(""),x(""),w(""))},disabled:_||c,children:c?"Reportando...":"Reportar"})]})]}),i.reports.length>0&&a("div",{className:"space-y-3",children:[e("h4",{className:"text-sm font-medium",children:n("ap_reports_history")}),e("div",{className:"space-y-2",children:i.reports.map(a=>e(Pe,{report:a,onEdit:()=>o(a),onDelete:()=>h(a.id),disabled:!l},a.id))})]}),e(Se,{open:!!d,onOpenChange:e=>!e&&o(null),report:d,onSave:u,isSubmitting:c})]})}function Pe({report:t,onEdit:n,onDelete:s,disabled:i}){const r=t.date?new Date(t.date):null,l=Ce(t.percentProgress);return a("div",{className:"flex items-start gap-3 rounded-lg border bg-card p-3",children:[e("div",{className:"flex-shrink-0 h-8 w-8 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground",children:t.userName?.charAt(0)?.toUpperCase()||"?"}),a("div",{className:"flex-1 min-w-0 space-y-1",children:[a("div",{className:"flex items-center gap-2 text-sm",children:[e("span",{className:"font-medium truncate",children:t.userName}),r&&e("span",{className:"text-xs text-muted-foreground",children:r.toLocaleDateString("pt-BR")})]}),a("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[a("span",{style:{color:l||void 0},className:"font-semibold",children:[t.percentProgress,"%"]}),t.timeProgress&&a("span",{children:["Tempo: ",_e(t.timeProgress)]})]}),t.comments&&e("p",{className:"text-xs text-muted-foreground mt-1",children:t.comments})]}),!i&&e(y,{onEdit:n,onDelete:s})]})}function Ae({predecessors:t=[],availablePredecessors:n=[],onAdd:i,onRemove:r,disabled:u=!1}){const{t:p}=ee(),[h,g]=J.useState(""),f=n.filter(e=>!t.some(a=>a.predecessorId===e.id));return a("div",{className:"space-y-6 p-1",children:[!u&&f.length>0&&a("div",{className:"flex items-end gap-3",children:[a("div",{className:"flex-1 space-y-2",children:[e(s,{children:p("ap_add_predecessor")}),a(l,{value:h,onValueChange:g,children:[e(c,{children:e(d,{placeholder:p("ap_select_action")})}),e(o,{children:f.map(a=>e(m,{value:a.id,children:a.label},a.id))})]})]}),a(N,{size:"sm",onClick:()=>{h&&i&&(i(h),g(""))},disabled:!h,children:[e(T,{className:"h-4 w-4 mr-1"}),"Adicionar"]})]}),t.length>0?e("div",{className:"space-y-2",children:t.map(t=>a("div",{className:"flex items-center justify-between rounded-lg border bg-card p-3",children:[a("div",{className:"flex items-center gap-3",children:[t.predecessorCode&&e("span",{className:"text-xs text-muted-foreground font-mono",children:t.predecessorCode}),e("span",{className:"text-sm font-medium",children:t.predecessorName}),null!=t.predecessorStatus&&e(Ne,{status:t.predecessorStatus})]}),!u&&r&&e(y,{onDelete:()=>r(t.predecessorId)})]},t.id))}):e("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Nenhum predecessor adicionado"})]})}function Fe({costs:t=[],onAdd:n,onEdit:i,onDelete:l,disabled:c=!1}){const{t:d}=ee(),[o,m]=Q(""),[u,p]=Q(""),h=t.reduce((e,a)=>e+(a.value||0),0);return a("div",{className:"space-y-6 p-1",children:[a("div",{className:"rounded-lg border bg-card p-4 flex items-center justify-between",children:[e("span",{className:"text-sm font-medium",children:d("ap_total_cost")}),a("span",{className:"text-lg font-semibold text-foreground",children:["R$ ",h.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),!c&&n&&a("div",{className:"rounded-lg border bg-card p-4 space-y-4",children:[e("h4",{className:"text-sm font-medium",children:d("ap_add_cost")}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a("div",{className:"space-y-2",children:[e(s,{children:"Descrição"}),e(r,{value:o,onChange:e=>m(e.target.value),placeholder:d("ap_cost_description")})]}),a("div",{className:"space-y-2",children:[e(s,{children:"Valor (R$)"}),e(r,{type:"number",min:0,step:.01,value:u,onChange:e=>p(e.target.value),placeholder:"0,00"})]})]}),e("div",{className:"flex justify-end",children:a(N,{size:"sm",onClick:()=>{o&&u&&n&&(n({description:o,value:Number(u),date:(new Date).toISOString()}),m(""),p(""))},disabled:!o||!u,children:[e(T,{className:"h-4 w-4 mr-1"}),"Adicionar"]})})]}),t.length>0?e("div",{className:"space-y-2",children:t.map(t=>a("div",{className:"flex items-center justify-between rounded-lg border bg-card p-3",children:[a("div",{className:"flex-1 min-w-0",children:[e("p",{className:"text-sm font-medium truncate",children:t.description}),t.date&&e("p",{className:"text-xs text-muted-foreground",children:new Date(t.date).toLocaleDateString("pt-BR")})]}),a("div",{className:"flex items-center gap-3",children:[a("span",{className:"text-sm font-semibold whitespace-nowrap",children:["R$ ",t.value.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]}),!c&&(i||l)&&e(y,{onEdit:i?()=>i(t):void 0,onDelete:l?()=>l(t.id):void 0})]})]},t.id))}):e("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Nenhum custo registrado"})]})}function Ie({comments:t=[],currentUserId:n,onAdd:s,onEdit:i,onDelete:r,disabled:l=!1,maxLength:c=4e3}){const{t:d}=ee(),[o,m]=Q(""),[u,h]=Q(!1),[g,f]=Q(null),[v,x]=Q(""),b=()=>{f(null),x("")};return a("div",{className:"space-y-6 p-1",children:[!l&&s&&a("div",{className:"space-y-3",children:[e(p,{value:o,onChange:e=>m(e.target.value),placeholder:d("ap_add_comment_placeholder"),maxLength:c,rows:3}),a("div",{className:"flex items-center justify-between",children:[c&&a("span",{className:"text-xs text-muted-foreground",children:[o.length,"/",c]}),a("div",{className:"flex gap-2 ml-auto",children:[e(N,{variant:"outline",size:"sm",onClick:()=>m(""),disabled:!o||u,children:"Limpar"}),e(N,{size:"sm",onClick:async()=>{if(o.trim()&&s){h(!0);try{await s(o),m("")}finally{h(!1)}}},disabled:!o.trim()||u,children:u?"Enviando...":"Comentar"})]})]})]}),a("div",{className:"space-y-1",children:[t.length>0?a("div",{className:"flex items-center gap-2 mb-3",children:[e("span",{className:"text-sm font-medium",children:d("ap_comments")}),e(w,{variant:"info",className:"text-[10px] px-1.5 py-0",children:t.length})]}):a("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e($,{className:"h-8 w-8 mb-2 opacity-50"}),e("p",{className:"text-sm",children:"Nenhum comentário adicionado"})]}),t.map(t=>a("div",{className:"flex gap-3 rounded-lg border bg-card p-3",children:[e("div",{className:"flex-shrink-0 h-8 w-8 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground overflow-hidden",children:t.userPhotoUrl?e("img",{src:t.userPhotoUrl,alt:t.userName,className:"h-full w-full object-cover"}):t.userName?.charAt(0)?.toUpperCase()||"?"}),a("div",{className:"flex-1 min-w-0 space-y-1",children:[a("div",{className:"flex items-center gap-2 text-sm",children:[e("span",{className:"font-medium truncate",children:t.userName}),t.userEmail&&e("span",{className:"text-xs text-muted-foreground truncate",children:t.userEmail}),e("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:Ee(t.dateEdited||t.dateCreation)}),t.dateEdited&&e("span",{className:"text-xs text-muted-foreground italic",children:"editado"})]}),g===t.id?a("div",{className:"space-y-2",children:[e(p,{value:v,onChange:e=>x(e.target.value),maxLength:c,rows:3}),a("div",{className:"flex gap-2 justify-end",children:[e(N,{variant:"outline",size:"sm",onClick:b,disabled:u,children:"Cancelar"}),e(N,{size:"sm",onClick:()=>(async e=>{if(v.trim()&&i){h(!0);try{await i({...e,text:v,stringText:v}),f(null),x("")}finally{h(!1)}}})(t),disabled:!v.trim()||u,children:u?"Salvando...":"Salvar"})]})]}):e("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:t.stringText||t.text})]}),!l&&n===t.userId&&g!==t.id&&e(y,{onEdit:i?()=>(e=>{f(e.id),x(e.stringText||e.text)})(t):void 0,onDelete:r?()=>(async e=>{if(r){h(!0);try{await r(e)}finally{h(!1)}}})(t.id):void 0})]},t.id))]})]})}function Ee(e){const{t:a}=ee();if(!e)return"";const t=new Date(e);return`${t.toLocaleDateString("pt-BR")} ${t.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}`}function Le({history:t=[],isLoading:n=!1}){const{t:s}=ee();return n?e("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:"Carregando histórico..."}):0===t.length?a("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e(z,{className:"h-8 w-8 mb-2 opacity-50"}),e("p",{className:"text-sm",children:s("ap_no_history")})]}):e("div",{className:"p-1",children:a("div",{className:"relative",children:[e("div",{className:"absolute left-4 top-0 bottom-0 w-px bg-border"}),e("div",{className:"space-y-0",children:t.map((t,n)=>a("div",{className:"relative flex gap-4 pb-6 last:pb-0",children:[e("div",{className:"relative z-10 flex-shrink-0 h-8 w-8 rounded-full bg-primary/10 border-2 border-primary/30 flex items-center justify-center",children:t.icon?e("span",{className:"text-xs text-primary",children:t.icon}):e("div",{className:"h-2 w-2 rounded-full bg-primary"})}),a("div",{className:"flex-1 min-w-0 rounded-lg border bg-card p-3 space-y-2",children:[a("div",{children:[e("h4",{className:"text-sm font-medium",children:t.translateEvent||t.eventName}),t.eventDescription&&e("p",{className:"text-xs text-muted-foreground",children:t.eventDescription})]}),a("div",{className:"flex items-center gap-2",children:[e("div",{className:"flex-shrink-0 h-6 w-6 rounded-full bg-muted overflow-hidden flex items-center justify-center text-[10px] font-medium text-muted-foreground",children:t.userPhotoUrl?e("img",{src:t.userPhotoUrl,alt:t.userName,className:"h-full w-full object-cover"}):t.userName?.charAt(0)?.toUpperCase()||"?"}),a("div",{className:"min-w-0",children:[e("span",{className:"text-xs font-medium truncate block",children:t.userName}),t.userEmail&&e("span",{className:"text-[10px] text-muted-foreground truncate block",children:t.userEmail})]})]}),a("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[a("div",{className:"flex items-center gap-1",children:[e(V,{className:"h-3 w-3"}),e("span",{children:je(t.date)})]}),a("div",{className:"flex items-center gap-1",children:[e(z,{className:"h-3 w-3"}),e("span",{children:Re(t.date)})]}),t.isMobileRequest&&a("div",{className:"flex items-center gap-1",children:[e(M,{className:"h-3 w-3"}),e("span",{children:s("ap_via_app")})]})]})]})]},t.id))})]})})}function je(e){const{t:a}=ee();return new Date(e).toLocaleDateString("pt-BR")}function Re(e){const{t:a}=ee();return new Date(e).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}function Be({attachments:n=[],onUpload:s,onDelete:r,onRename:l,onDownload:c,onView:d,disabled:o=!1}){const{t:m}=ee(),u=Z(null),[p,h]=Q(null),[g,f]=Q(""),v=async e=>{g.trim()&&l&&(await l(e.id,g),h(null),f(""))},x=()=>{h(null),f("")};return a("div",{className:"space-y-4 p-1",children:[!o&&s&&a(t,{children:[e("input",{ref:u,type:"file",multiple:!0,className:"hidden",onChange:e=>{const a=e.target.files;if(a&&s){for(let e=0;e<a.length;e++){const t=a.item(e);t&&s(t)}u.current&&(u.current.value="")}}}),a(N,{size:"sm",onClick:()=>u.current?.click(),children:[e(T,{className:"h-4 w-4 mr-1"}),"Adicionar anexo"]})]}),n.length>0?e("div",{className:"space-y-2",children:n.map(n=>a("div",{className:i("flex items-center gap-3 rounded-lg border bg-card p-3",n.status===ie.error&&"border-destructive/50 bg-destructive/5",n.status===ie.canceled&&"opacity-50"),children:[e("div",{className:"flex-shrink-0 h-9 w-9 rounded bg-muted flex items-center justify-center",children:e("span",{className:"text-[10px] font-bold uppercase text-muted-foreground",children:n.extension.replace(".","").substring(0,4)})}),a("div",{className:"flex-1 min-w-0 space-y-1",children:[p===n.id?a("div",{className:"flex items-center gap-2",children:[e("input",{className:"flex-1 text-sm border rounded px-2 py-1 bg-background",value:g,onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"===e.key&&v(n),"Escape"===e.key&&x()},autoFocus:!0}),e(N,{size:"sm",variant:"outline",onClick:x,children:m("cancel")}),e(N,{size:"sm",onClick:()=>v(n),children:m("save")})]}):e("button",{type:"button",className:"text-sm font-medium truncate block text-left hover:underline cursor-pointer",onClick:()=>d?.(n.id),children:n.name}),(n.status===ie.uploading||n.status===ie.waiting)&&e(b,{value:n.progress||0,className:"h-1.5"}),n.status===ie.error&&e("p",{className:"text-xs text-destructive",children:"Erro ao enviar arquivo"}),n.status===ie.duplicateItem&&e("p",{className:"text-xs text-warning",children:"Arquivo duplicado"}),n.status===ie.canceled&&e("p",{className:"text-xs text-muted-foreground",children:"Upload cancelado"})]}),a("div",{className:"flex items-center gap-2",children:[n.status===ie.done&&a(t,{children:[e("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:ze(n.size)}),e(y,{onDelete:r&&!o?()=>r(n.id):void 0,customActions:[{label:"Renomear",icon:U,onClick:()=>(e=>{const a=e.name.replace(e.extension,"");h(e.id),f(a)})(n),show:!!l&&!o},{label:"Visualizar",icon:O,onClick:()=>d?.(n.id),show:!!d},{label:"Download",icon:q,onClick:()=>c?.(n.id),show:!!c}]})]}),n.status===ie.uploading&&e(N,{variant:"outline",size:"sm",onClick:()=>r?.(n.id),children:"Cancelar"})]})]},n.id))}):a("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e(W,{className:"h-8 w-8 mb-2 opacity-50"}),e("p",{className:"text-sm",children:"Nenhum anexo adicionado"})]})]})}function ze(e){const{t:a}=ee();if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB"][t]}`}function Te(t){const{formData:n,isLoading:s,isSaving:i,activeTab:r,isFormDisabled:l,updateField:c,setActiveTab:d,save:o,changeStatus:m,remove:u,cancel:p}=ve(t),{t:h}=ee(),{isNew:g=!1,config:f,users:v,places:x,actionTypes:b,causes:y,parentActions:w,progress:E,predecessors:L,availablePredecessors:j,costs:R,comments:B,history:z,attachments:T,attachmentsSlot:$,commentsSlot:V,historySlot:M,onAddPredecessor:U,onRemovePredecessor:O,onAddCost:q,onEditCost:W,onDeleteCost:K,onAddComment:J,onEditComment:Q,onDeleteComment:X,onUploadAttachment:Y,onDeleteAttachment:Z,onRenameAttachment:te,onDownloadAttachment:ne,onViewAttachment:se}=t;if(s&&!n.id)return e(D,{isLoading:!0,children:e("div",{})});const ie=function(e){const{t:a}=ee();if(!e)return[];return{[ae.waitingStart]:[ae.running,ae.suspended,ae.canceled],[ae.running]:[ae.effectivenessCheck,ae.done,ae.suspended,ae.canceled],[ae.effectivenessCheck]:[ae.running,ae.done,ae.suspended,ae.canceled],[ae.done]:[ae.running],[ae.suspended]:[ae.running,ae.canceled],[ae.canceled]:[ae.waitingStart]}[e]||[]}(n.statusId);return a("div",{className:"flex flex-col h-full",children:[a("div",{className:"flex items-center justify-between border-b bg-card px-6 py-4",children:[a("div",{className:"flex items-center gap-4",children:[p&&e(N,{variant:"ghost",size:"icon",onClick:p,children:e(H,{className:"h-4 w-4"})}),a("div",{className:"space-y-1",children:[a("div",{className:"flex items-center gap-3",children:[e("h1",{className:"text-lg font-semibold",children:g?h("ap_new_action"):n.name||h("ap_action_plan")}),!g&&n.statusId&&e(Ne,{status:n.statusId})]}),n.code&&e("p",{className:"text-xs text-muted-foreground font-mono",children:n.code})]})]}),a("div",{className:"flex items-center gap-2",children:[!g&&ie.length>0&&!l&&a(_,{children:[e(C,{asChild:!0,children:e(N,{variant:"outline",size:"sm",children:"Alterar Status"})}),e(S,{align:"end",children:ie.map(a=>e(k,{onClick:()=>m(a),children:oe[a]},a))})]}),!g&&t.onDelete&&a(_,{children:[e(C,{asChild:!0,children:e(N,{variant:"ghost",size:"icon",children:e(G,{className:"h-4 w-4"})})}),e(S,{align:"end",children:e(k,{className:"text-destructive",onClick:u,children:"Excluir"})})]})]})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e("div",{className:"ds-page-shell",children:a(P,{value:r,onValueChange:d,children:[a(A,{className:"mb-6",children:[e(F,{value:"general",children:"Geral"}),!g&&e(F,{value:"progress",children:"Progresso"}),!g&&f?.enablePredecessors&&e(F,{value:"predecessors",children:h("ap_predecessors")}),!g&&f?.enableCosts&&e(F,{value:"costs",children:"Custos"}),!g&&f?.enableAttachments&&e(F,{value:"attachments",children:h("ap_attachments")}),!g&&f?.enableComments&&e(F,{value:"comments",children:h("ap_comments")}),!g&&f?.enableHistory&&e(F,{value:"history",children:"Histórico"})]}),e(I,{value:"general",children:e(be,{formData:n,updateField:c,disabled:l,users:v,places:x,actionTypes:b,causes:y,parentActions:w,config:f})}),!g&&e(I,{value:"progress",children:e(ke,{...t})}),!g&&f?.enablePredecessors&&e(I,{value:"predecessors",children:e(Ae,{predecessors:L,availablePredecessors:j,onAdd:U,onRemove:O,disabled:l})}),!g&&f?.enableCosts&&e(I,{value:"costs",children:e(Fe,{costs:R,onAdd:q,onEdit:W,onDelete:K,disabled:l})}),!g&&f?.enableAttachments&&e(I,{value:"attachments",children:$||e(Be,{attachments:T,onUpload:Y,onDelete:Z,onRename:te,onDownload:ne,onView:se,disabled:l})}),!g&&f?.enableComments&&e(I,{value:"comments",children:V||e(Ie,{comments:B,onAdd:J,onEdit:Q,onDelete:X,disabled:l})}),!g&&f?.enableHistory&&e(I,{value:"history",children:M||e(Le,{history:z})})]})})}),a("div",{className:"flex items-center justify-end gap-3 border-t bg-card px-6 py-4",children:[p&&e(N,{variant:"secondary",onClick:p,disabled:i,children:"Cancelar"}),e(N,{onClick:o,disabled:i||l,children:i?"Salvando...":"Salvar"})]})]})}export{Be as ActionPlanAttachmentsTab,Ie as ActionPlanCommentsTab,Fe as ActionPlanCostTab,be as ActionPlanGeneralTab,Le as ActionPlanHistoryTab,Te as ActionPlanPage,Ae as ActionPlanPredecessorsTab,Se as ActionPlanProgressDialog,ke as ActionPlanProgressTab,Ne as ActionPlanStatusBadge,ge as CLOSED_STATUSES,ue as DEFAULT_ACTION_TYPES,ie as EAttachmentItemStatus,ne as ETaskPlanAssociationType,te as ETaskPlanPriority,ae as ETaskPlanStatus,se as ETaskPlanTypeProgress,he as PRIORITIES,fe as PROGRESS_ALLOWED_STATUSES,re as STATUS_COLORS,oe as STATUS_LABELS,ce as STATUS_MAP,le as STATUS_TEXT_COLORS,_e as formatTime,De as formatTimeProgress,me as getActionTypes,pe as getPriorities,Ce as getProgressColor,de as getStatusLabels,ve as useActionPlan,we as useActionPlanProgress};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),s=require("forlogic-core"),t=require("lucide-react"),a=require("i18next"),n=require("react"),r=require("react-i18next"),i=(e=>(e[e.waitingStart=1]="waitingStart",e[e.running=2]="running",e[e.effectivenessCheck=3]="effectivenessCheck",e[e.done=4]="done",e[e.suspended=5]="suspended",e[e.canceled=6]="canceled",e))(i||{}),l=(e=>(e[e.low=0]="low",e[e.medium=1]="medium",e[e.high=2]="high",e))(l||{}),c=(e=>(e[e.plan=2]="plan",e[e.occurrence=3]="occurrence",e[e.risk=4]="risk",e[e.decisions=5]="decisions",e[e.audit=6]="audit",e[e.strategyExtension=7]="strategyExtension",e[e.standardization=8]="standardization",e[e.supplier=9]="supplier",e[e.auditItems=10]="auditItems",e))(c||{}),d=(e=>(e[e.currentProgress=1]="currentProgress",e[e.cumulativeProgress=2]="cumulativeProgress",e))(d||{}),o=(e=>(e.uploading="uploading",e.waiting="waiting",e.done="done",e.error="error",e.canceled="canceled",e.duplicateItem="duplicateItem",e))(o||{});const m={[i.waitingStart]:"#D6D6D6",[i.running]:"#DAE9F4",[i.effectivenessCheck]:"#1B75BB29",[i.done]:"#DDEECA",[i.suspended]:"#FFF2D6",[i.canceled]:"#F4433629"},u={[i.waitingStart]:"#666666",[i.running]:"#1B75BB",[i.effectivenessCheck]:"#1B75BB",[i.done]:"#4CAF50",[i.suspended]:"#FF9800",[i.canceled]:"#F44336"},x={[i.waitingStart]:"waiting-start",[i.running]:"running",[i.effectivenessCheck]:"effectiveness-check",[i.done]:"done",[i.suspended]:"suspended",[i.canceled]:"canceled"};function p(){return{[i.waitingStart]:a.t("ap_status_waiting_start"),[i.running]:a.t("ap_status_running"),[i.effectivenessCheck]:a.t("ap_status_effectiveness_check"),[i.done]:a.t("ap_status_done"),[i.suspended]:a.t("ap_status_suspended"),[i.canceled]:a.t("ap_status_canceled")}}const h=new Proxy({},{get:(e,s)=>{if("symbol"==typeof s)return;return p()[s]}});const g=[{id:"immediate",label:"Imediata"},{id:"corrective",label:"Corretiva"},{id:"preventive",label:"Preventiva"},{id:"improvement",label:"Oportunidade de Melhoria"},{id:"standardization",label:"Padronização"}];const j=[{id:l.low,label:"Baixa",color:"#4CAF50"},{id:l.medium,label:"Média",color:"#FF9800"},{id:l.high,label:"Alta",color:"#F44336"}],f=[i.done,i.canceled],v=[i.waitingStart,i.running,i.effectivenessCheck,i.suspended];function b(e){const{actionPlan:s,isNew:t=!1,config:a,onSave:r,onCancel:i,onDelete:l,onChangeStatus:c}=e,[d,o]=n.useState({formData:s||{},isLoading:e.isLoading||!1,isSaving:!1,activeTab:"general",isFormDisabled:!1});n.useEffect(()=>{s&&o(e=>({...e,formData:s,isFormDisabled:a?.disableFields||f.includes(s.statusId)}))},[s,a?.disableFields]),n.useEffect(()=>{o(s=>({...s,isLoading:e.isLoading||!1}))},[e.isLoading]);const m=n.useCallback((e,s)=>{o(t=>({...t,formData:{...t.formData,[e]:s}}))},[]),u=n.useCallback(e=>{o(s=>({...s,activeTab:e}))},[]),x=n.useCallback(async()=>{if(r){o(e=>({...e,isSaving:!0}));try{await r(d.formData)}finally{o(e=>({...e,isSaving:!1}))}}},[r,d.formData]),p=n.useCallback(async e=>{if(c&&d.formData.id){o(e=>({...e,isLoading:!0}));try{await c(d.formData.id,e)}finally{o(e=>({...e,isLoading:!1}))}}},[c,d.formData.id]),h=n.useCallback(async()=>{if(l&&d.formData.id){o(e=>({...e,isLoading:!0}));try{await l(d.formData.id)}finally{o(e=>({...e,isLoading:!1}))}}},[l,d.formData.id]);return{formData:d.formData,isLoading:d.isLoading,isSaving:d.isSaving,activeTab:d.activeTab,isFormDisabled:d.isFormDisabled,updateField:m,setActiveTab:u,save:x,changeStatus:p,remove:h,cancel:i}}const N={[i.waitingStart]:{label:"",color:"#8B7355",icon:t.Clock},[i.running]:{label:"",color:"#2E7D5B",icon:t.Play},[i.effectivenessCheck]:{label:"",color:"#4A6FA5",icon:t.ShieldCheck},[i.done]:{label:"",color:"#3D7A40",icon:t.CheckCircle2},[i.suspended]:{label:"",color:"#6B7280",icon:t.Pause},[i.canceled]:{label:"",color:"#B44A4A",icon:t.X}};function y({status:t,labels:a,className:n,size:r,showIcon:i,variant:l}){const c=p(),d=N[t];if(!d)return null;const o=a?.[t]||c[t]||"";return e.jsx(s.StatusBadge,{label:o,color:d.color,icon:d.icon,size:r,showIcon:i,variant:l,className:n})}function C({formData:t,updateField:a,disabled:i=!1,users:l=[],places:c=[],actionTypes:d,causes:o=[],parentActions:m=[],config:u}){const{t:x}=r.useTranslation(),p=u?.requiredFields,h=d||g,f=e=>{if(u?.hiddenFields?.includes(e))return!1;if(u?.visibleFields&&u.visibleFields.length>0)return u.visibleFields.includes(e);const s=`${e}Visible`;return!p||!(s in p)||!1!==p[s]},v=e=>p?!!p[e]:"name"===e,b=n.useMemo(()=>{if(t.startDate&&t.endDate){const e=new Date(t.startDate),s=new Date(t.endDate).getTime()-e.getTime();return Math.max(0,Math.ceil(s/864e5))}return t.duration||0},[t.startDate,t.endDate,t.duration]);return e.jsxs("div",{className:"space-y-6 p-1",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("name")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Nome"}),e.jsx(s.Input,{value:t.name||"",onChange:e=>a("name",e.target.value),maxLength:500,disabled:i,placeholder:x("ap_plan_name_placeholder")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[f("responsibleWho")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("responsibleWho")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Responsável"}),e.jsxs(s.Select,{value:t.responsibleId||"",onValueChange:e=>a("responsibleId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_responsible")})}),e.jsx(s.SelectContent,{children:l.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.name},t.id))})]})]}),f("checkerWho")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("checkerWho")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Verificador"}),e.jsxs(s.Select,{value:t.checkerId||"",onValueChange:e=>a("checkerId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_checker")})}),e.jsx(s.SelectContent,{children:l.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.name},t.id))})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[f("place")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("place")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Local"}),e.jsxs(s.Select,{value:t.placeId||"",onValueChange:e=>a("placeId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_place")})}),e.jsx(s.SelectContent,{children:S(c).map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.name},t.id))})]})]}),f("planType")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("planType")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Tipo de Ação"}),e.jsxs(s.Select,{value:t.typeId||"",onValueChange:e=>a("typeId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_type")})}),e.jsx(s.SelectContent,{children:h.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.label},t.id))})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[f("priority")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("priority")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Prioridade"}),e.jsxs(s.Select,{value:t.priorityType?.toString()||"",onValueChange:e=>a("priorityType",Number(e)),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_priority")})}),e.jsx(s.SelectContent,{children:j.map(t=>e.jsx(s.SelectItem,{value:t.id.toString(),children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:t.color}}),t.label]})},t.id))})]})]}),m.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:x("ap_belongs_to")}),e.jsxs(s.Select,{value:t.parentId||"",onValueChange:e=>a("parentId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_parent")})}),e.jsx(s.SelectContent,{children:m.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.label},t.id))})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[f("startDate")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("startDate")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Data de Início"}),e.jsx(s.DatePicker,{date:t.startDate?new Date(t.startDate):void 0,onDateChange:e=>a("startDate",e||null),disabled:i,placeholder:x("ap_select_date")})]}),f("endDate")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("endDate")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Data de Término"}),e.jsx(s.DatePicker,{date:t.endDate?new Date(t.endDate):void 0,onDateChange:e=>a("endDate",e||null),disabled:i,placeholder:x("ap_select_date"),disabledDates:t.startDate?e=>e<new Date(t.startDate):void 0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:x("ap_duration_days")}),e.jsx(s.Input,{type:"number",value:b,disabled:!0,className:"bg-muted"})]})]}),f("estimatedCost")&&e.jsxs("div",{className:"space-y-2 max-w-xs",children:[e.jsx(s.Label,{className:s.cn(v("estimatedCost")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Custo Estimado"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground text-sm",children:"R$"}),e.jsx(s.Input,{type:"number",min:0,step:.01,value:t.estimatedCost||"",onChange:e=>a("estimatedCost",Number(e.target.value)),disabled:i,className:"pl-9",placeholder:"0,00"})]})]}),f("cause")&&o.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:"Causa"}),e.jsxs(s.Select,{value:t.causeId||"",onValueChange:e=>a("causeId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_cause")})}),e.jsx(s.SelectContent,{children:o.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.label},t.id))})]})]}),f("description")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("description")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Descrição"}),e.jsx(s.Textarea,{value:t.description||"",onChange:e=>a("description",e.target.value),maxLength:4e3,disabled:i,rows:4,placeholder:x("ap_description_placeholder")})]}),f("justification")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("justification")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Justificativa"}),e.jsx(s.Textarea,{value:t.justification||"",onChange:e=>a("justification",e.target.value),maxLength:4e3,disabled:i,rows:4,placeholder:x("ap_justification_placeholder")})]})]})}function S(e,s=0){const t=[];for(const a of e)t.push({...a,depth:s}),a.children?.length&&t.push(...S(a.children,s+1));return t}function w(e){const{progress:s,onReportProgress:t,onEditProgress:a,onDeleteProgress:r}=e,[i,l]=n.useState(!1),[c,d]=n.useState(null),o=!!s&&v.includes(s.status),m=n.useCallback(async e=>{if(t&&s){l(!0);try{const a=100===e.percentProgress;await t({id:s.id,...e,conclude:a})}finally{l(!1)}}},[t,s]),u=n.useCallback(async e=>{if(a){l(!0);try{await a(e)}finally{l(!1),d(null)}}},[a]),x=n.useCallback(async e=>{if(r){l(!0);try{await r(e)}finally{l(!1)}}},[r]);return{progress:s,canReportProgress:o,isSubmitting:i,editingReport:c,setEditingReport:d,reportProgress:m,editProgress:u,deleteProgress:x}}function D(e){if(!e)return"";let s=(e||"").trim();if(!s)return"00:00";if(s.includes(":")){const e=s.split(":");if(e.length>=2){const s=e[0].replace(/\D/g,""),t=e[1].replace(/\D/g,"");let a=parseInt(s)||0,n=parseInt(t)||0;return a+=Math.floor(n/60),n%=60,`${a.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}}if(s=s.replace(/\D/g,""),!s)return"00:00";let t=0,a=0;return 4===s.length?(t=parseInt(s.substring(0,2))||0,a=parseInt(s.substring(2,4))||0,t+=Math.floor(a/60),a%=60):(t=parseInt(s)||0,a=0),`${t.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}function T(e){if(null==e)return"00:00";const s=String(e).replace(/\D/g,"");if(s.length<3){let e=parseInt(s)||0;const t=Math.floor(e/60);return e%=60,`${t.toString().padStart(2,"0")}:${e.toString().padStart(2,"0")}`}{const e=s.slice(-2),t=s.slice(0,-2);let a=parseInt(t)||0,n=parseInt(e)||0;return a+=Math.floor(n/60),n%=60,`${a.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}}function _(e){return 100===e?"#84c148":e>0?"#1b75bb":""}function P({open:t,onOpenChange:a,report:i,onSave:l,isSubmitting:c=!1}){const{t:d}=r.useTranslation(),[o,m]=n.useState(i?.percentProgress||0),[u,x]=n.useState(i?.timeProgress||""),[p,h]=n.useState(i?.comments||""),g=o!==(i?.percentProgress??0)||u!==(i?.timeProgress??"")||p!==(i?.comments??"");n.useEffect(()=>{i&&(m(i.percentProgress),x(i.timeProgress||""),h(i.comments||""))},[i]);return e.jsx(s.Dialog,{open:t,onOpenChange:a,children:e.jsxs(s.DialogContent,{className:"sm:max-w-md",variant:"form",isDirty:g,children:[e.jsx(s.DialogHeader,{children:e.jsx(s.DialogTitle,{children:d("ap_edit_progress")})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:d("ap_progress_percent")}),e.jsx(s.Input,{type:"number",min:0,max:100,value:o,onChange:e=>m(Number(e.target.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:d("ap_time_spent")}),e.jsx(s.Input,{value:u,onChange:e=>x(e.target.value),onBlur:()=>x(D(u)||""),placeholder:"00:00"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:d("ap_comments")}),e.jsx(s.Textarea,{value:p,onChange:e=>h(e.target.value),rows:3,maxLength:4e3})]})]}),e.jsxs(s.DialogFooter,{children:[e.jsx(s.Button,{variant:"outline",onClick:()=>a(!1),disabled:c,children:"Cancelar"}),e.jsx(s.Button,{onClick:()=>{i&&l({...i,percentProgress:o,timeProgress:D(u)||"00:00",comments:p})},disabled:c,children:c?"Salvando...":"Salvar"})]})]})})}function k(t){const{t:a}=r.useTranslation(),{progress:i,canReportProgress:l,isSubmitting:c,editingReport:d,setEditingReport:o,reportProgress:m,editProgress:u,deleteProgress:x}=w(t),[p,h]=n.useState(""),[g,j]=n.useState(""),[f,v]=n.useState("");if(!i)return e.jsx("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:"Sem dados de progresso disponíveis"});const b=_(i.percentProgress),N=!p,y=!p&&!g&&!f;return e.jsxs("div",{className:"space-y-6 p-1",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"font-medium",children:a("ap_overall_progress")}),e.jsxs("span",{className:"font-semibold",style:{color:b||void 0},children:[i.percentProgress,"%"]})]}),e.jsx(s.Progress,{value:i.percentProgress,className:"h-3"}),i.timeProgress&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Tempo total: ",T(i.timeProgress)]})]}),l&&e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-4",children:[e.jsx("h4",{className:"text-sm font-medium",children:a("ap_report_progress")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:a("ap_progress_percent")}),e.jsx(s.Input,{type:"number",min:0,max:100,value:p,onChange:e=>h(e.target.value),placeholder:"0"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:a("ap_time_spent")}),e.jsx(s.Input,{value:g,onChange:e=>j(e.target.value),onBlur:()=>j(D(g)||""),placeholder:"00:00"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:a("ap_comments")}),e.jsx(s.Textarea,{value:f,onChange:e=>v(e.target.value),rows:3,maxLength:4e3,placeholder:a("ap_progress_comment_placeholder")})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(s.Button,{variant:"outline",size:"sm",onClick:()=>{h(""),j(""),v("")},disabled:y||c,children:"Limpar"}),e.jsx(s.Button,{size:"sm",onClick:async()=>{const e=Number(p);(e||0===e)&&(await m({percentProgress:e,timeProgress:D(g)||"00:00",comments:f}),h(""),j(""),v(""))},disabled:N||c,children:c?"Reportando...":"Reportar"})]})]}),i.reports.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-sm font-medium",children:a("ap_reports_history")}),e.jsx("div",{className:"space-y-2",children:i.reports.map(s=>e.jsx(A,{report:s,onEdit:()=>o(s),onDelete:()=>x(s.id),disabled:!l},s.id))})]}),e.jsx(P,{open:!!d,onOpenChange:e=>!e&&o(null),report:d,onSave:u,isSubmitting:c})]})}function A({report:t,onEdit:n,onDelete:r,disabled:i}){const l=t.date?new Date(t.date):null,c=_(t.percentProgress);return e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border bg-card p-3",children:[e.jsx("div",{className:"flex-shrink-0 h-8 w-8 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground",children:t.userName?.charAt(0)?.toUpperCase()||"?"}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"font-medium truncate",children:t.userName}),l&&e.jsx("span",{className:"text-xs text-muted-foreground",children:l.toLocaleDateString("pt-BR")})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{style:{color:c||void 0},className:"font-semibold",children:[t.percentProgress,"%"]}),t.timeProgress&&e.jsxs("span",{children:["Tempo: ",T(t.timeProgress)]})]}),t.comments&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:t.comments})]}),!i&&e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.ActionButton,{})}),e.jsxs(s.DropdownMenuContent,{align:"end",children:[e.jsx(s.DropdownMenuItem,{onClick:n,children:a.t("edit")}),e.jsx(s.DropdownMenuItem,{className:"text-destructive",onClick:r,children:a.t("ap_delete")})]})]})]})}function I({predecessors:a=[],availablePredecessors:i=[],onAdd:l,onRemove:c,disabled:d=!1}){const{t:o}=r.useTranslation(),[m,u]=n.useState(""),x=i.filter(e=>!a.some(s=>s.predecessorId===e.id));return e.jsxs("div",{className:"space-y-6 p-1",children:[!d&&x.length>0&&e.jsxs("div",{className:"flex items-end gap-3",children:[e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(s.Label,{children:o("ap_add_predecessor")}),e.jsxs(s.Select,{value:m,onValueChange:u,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:o("ap_select_action")})}),e.jsx(s.SelectContent,{children:x.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.label},t.id))})]})]}),e.jsxs(s.Button,{size:"sm",onClick:()=>{m&&l&&(l(m),u(""))},disabled:!m,children:[e.jsx(t.Plus,{className:"h-4 w-4 mr-1"}),"Adicionar"]})]}),a.length>0?e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[t.predecessorCode&&e.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:t.predecessorCode}),e.jsx("span",{className:"text-sm font-medium",children:t.predecessorName}),null!=t.predecessorStatus&&e.jsx(y,{status:t.predecessorStatus})]}),!d&&c&&e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.ActionButton,{})}),e.jsx(s.DropdownMenuContent,{align:"end",children:e.jsx(s.DropdownMenuItem,{className:"text-destructive",onClick:()=>c(t.predecessorId),children:"Remover"})})]})]},t.id))}):e.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Nenhum predecessor adicionado"})]})}function L({costs:a=[],onAdd:i,onEdit:l,onDelete:c,disabled:d=!1}){const{t:o}=r.useTranslation(),[m,u]=n.useState(""),[x,p]=n.useState(""),h=a.reduce((e,s)=>e+(s.value||0),0);return e.jsxs("div",{className:"space-y-6 p-1",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-medium",children:o("ap_total_cost")}),e.jsxs("span",{className:"text-lg font-semibold text-foreground",children:["R$ ",h.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),!d&&i&&e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-4",children:[e.jsx("h4",{className:"text-sm font-medium",children:o("ap_add_cost")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:"Descrição"}),e.jsx(s.Input,{value:m,onChange:e=>u(e.target.value),placeholder:o("ap_cost_description")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:"Valor (R$)"}),e.jsx(s.Input,{type:"number",min:0,step:.01,value:x,onChange:e=>p(e.target.value),placeholder:"0,00"})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(s.Button,{size:"sm",onClick:()=>{m&&x&&i&&(i({description:m,value:Number(x),date:(new Date).toISOString()}),u(""),p(""))},disabled:!m||!x,children:[e.jsx(t.Plus,{className:"h-4 w-4 mr-1"}),"Adicionar"]})})]}),a.length>0?e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:t.description}),t.date&&e.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(t.date).toLocaleDateString("pt-BR")})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-semibold whitespace-nowrap",children:["R$ ",t.value.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]}),!d&&(l||c)&&e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.ActionButton,{})}),e.jsxs(s.DropdownMenuContent,{align:"end",children:[l&&e.jsx(s.DropdownMenuItem,{onClick:()=>l(t),children:o("edit")}),c&&e.jsx(s.DropdownMenuItem,{className:"text-destructive",onClick:()=>c(t.id),children:o("ap_delete")})]})]})]})]},t.id))}):e.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Nenhum custo registrado"})]})}function B({comments:a=[],currentUserId:i,onAdd:l,onEdit:c,onDelete:d,disabled:o=!1,maxLength:m=4e3}){const{t:u}=r.useTranslation(),[x,p]=n.useState(""),[h,g]=n.useState(!1),[j,f]=n.useState(null),[v,b]=n.useState(""),N=()=>{f(null),b("")};return e.jsxs("div",{className:"space-y-6 p-1",children:[!o&&l&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(s.Textarea,{value:x,onChange:e=>p(e.target.value),placeholder:u("ap_add_comment_placeholder"),maxLength:m,rows:3}),e.jsxs("div",{className:"flex items-center justify-between",children:[m&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:[x.length,"/",m]}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsx(s.Button,{variant:"outline",size:"sm",onClick:()=>p(""),disabled:!x||h,children:"Limpar"}),e.jsx(s.Button,{size:"sm",onClick:async()=>{if(x.trim()&&l){g(!0);try{await l(x),p("")}finally{g(!1)}}},disabled:!x.trim()||h,children:h?"Enviando...":"Comentar"})]})]})]}),e.jsxs("div",{className:"space-y-1",children:[a.length>0?e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("span",{className:"text-sm font-medium",children:u("ap_comments")}),e.jsx(s.Badge,{variant:"info",className:"text-[10px] px-1.5 py-0",children:a.length})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(t.MessageSquare,{className:"h-8 w-8 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"Nenhum comentário adicionado"})]}),a.map(t=>e.jsxs("div",{className:"flex gap-3 rounded-lg border bg-card p-3",children:[e.jsx("div",{className:"flex-shrink-0 h-8 w-8 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground overflow-hidden",children:t.userPhotoUrl?e.jsx("img",{src:t.userPhotoUrl,alt:t.userName,className:"h-full w-full object-cover"}):t.userName?.charAt(0)?.toUpperCase()||"?"}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"font-medium truncate",children:t.userName}),t.userEmail&&e.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.userEmail}),e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:M(t.dateEdited||t.dateCreation)}),t.dateEdited&&e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"editado"})]}),j===t.id?e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Textarea,{value:v,onChange:e=>b(e.target.value),maxLength:m,rows:3}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(s.Button,{variant:"outline",size:"sm",onClick:N,disabled:h,children:"Cancelar"}),e.jsx(s.Button,{size:"sm",onClick:()=>(async e=>{if(v.trim()&&c){g(!0);try{await c({...e,text:v,stringText:v}),f(null),b("")}finally{g(!1)}}})(t),disabled:!v.trim()||h,children:h?"Salvando...":"Salvar"})]})]}):e.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:t.stringText||t.text})]}),!o&&i===t.userId&&j!==t.id&&e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.ActionButton,{})}),e.jsxs(s.DropdownMenuContent,{align:"end",children:[c&&e.jsx(s.DropdownMenuItem,{onClick:()=>(e=>{f(e.id),b(e.stringText||e.text)})(t),children:u("edit")}),d&&e.jsx(s.DropdownMenuItem,{className:"text-destructive",onClick:()=>(async e=>{if(d){g(!0);try{await d(e)}finally{g(!1)}}})(t.id),children:"Excluir"})]})]})]},t.id))]})]})}function M(e){const{t:s}=r.useTranslation();if(!e)return"";const t=new Date(e);return`${t.toLocaleDateString("pt-BR")} ${t.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}`}function E({history:s=[],isLoading:a=!1}){const{t:n}=r.useTranslation();return a?e.jsx("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:"Carregando histórico..."}):0===s.length?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(t.Clock,{className:"h-8 w-8 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:n("ap_no_history")})]}):e.jsx("div",{className:"p-1",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-4 top-0 bottom-0 w-px bg-border"}),e.jsx("div",{className:"space-y-0",children:s.map((s,a)=>e.jsxs("div",{className:"relative flex gap-4 pb-6 last:pb-0",children:[e.jsx("div",{className:"relative z-10 flex-shrink-0 h-8 w-8 rounded-full bg-primary/10 border-2 border-primary/30 flex items-center justify-center",children:s.icon?e.jsx("span",{className:"text-xs text-primary",children:s.icon}):e.jsx("div",{className:"h-2 w-2 rounded-full bg-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0 rounded-lg border bg-card p-3 space-y-2",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium",children:s.translateEvent||s.eventName}),s.eventDescription&&e.jsx("p",{className:"text-xs text-muted-foreground",children:s.eventDescription})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-shrink-0 h-6 w-6 rounded-full bg-muted overflow-hidden flex items-center justify-center text-[10px] font-medium text-muted-foreground",children:s.userPhotoUrl?e.jsx("img",{src:s.userPhotoUrl,alt:s.userName,className:"h-full w-full object-cover"}):s.userName?.charAt(0)?.toUpperCase()||"?"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-xs font-medium truncate block",children:s.userName}),s.userEmail&&e.jsx("span",{className:"text-[10px] text-muted-foreground truncate block",children:s.userEmail})]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(t.Calendar,{className:"h-3 w-3"}),e.jsx("span",{children:F(s.date)})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(t.Clock,{className:"h-3 w-3"}),e.jsx("span",{children:R(s.date)})]}),s.isMobileRequest&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(t.Smartphone,{className:"h-3 w-3"}),e.jsx("span",{children:n("ap_via_app")})]})]})]})]},s.id))})]})})}function F(e){const{t:s}=r.useTranslation();return new Date(e).toLocaleDateString("pt-BR")}function R(e){const{t:s}=r.useTranslation();return new Date(e).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}function z({attachments:a=[],onUpload:i,onDelete:l,onRename:c,onDownload:d,onView:m,disabled:u=!1}){const{t:x}=r.useTranslation(),p=n.useRef(null),[h,g]=n.useState(null),[j,f]=n.useState(""),v=async e=>{j.trim()&&c&&(await c(e.id,j),g(null),f(""))},b=()=>{g(null),f("")};return e.jsxs("div",{className:"space-y-4 p-1",children:[!u&&i&&e.jsxs(e.Fragment,{children:[e.jsx("input",{ref:p,type:"file",multiple:!0,className:"hidden",onChange:e=>{const s=e.target.files;if(s&&i){for(let e=0;e<s.length;e++){const t=s.item(e);t&&i(t)}p.current&&(p.current.value="")}}}),e.jsxs(s.Button,{size:"sm",onClick:()=>p.current?.click(),children:[e.jsx(t.Plus,{className:"h-4 w-4 mr-1"}),"Adicionar anexo"]})]}),a.length>0?e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("div",{className:s.cn("flex items-center gap-3 rounded-lg border bg-card p-3",t.status===o.error&&"border-destructive/50 bg-destructive/5",t.status===o.canceled&&"opacity-50"),children:[e.jsx("div",{className:"flex-shrink-0 h-9 w-9 rounded bg-muted flex items-center justify-center",children:e.jsx("span",{className:"text-[10px] font-bold uppercase text-muted-foreground",children:t.extension.replace(".","").substring(0,4)})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[h===t.id?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{className:"flex-1 text-sm border rounded px-2 py-1 bg-background",value:j,onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"===e.key&&v(t),"Escape"===e.key&&b()},autoFocus:!0}),e.jsx(s.Button,{size:"sm",variant:"outline",onClick:b,children:x("cancel")}),e.jsx(s.Button,{size:"sm",onClick:()=>v(t),children:x("save")})]}):e.jsx("button",{type:"button",className:"text-sm font-medium truncate block text-left hover:underline cursor-pointer",onClick:()=>m?.(t.id),children:t.name}),(t.status===o.uploading||t.status===o.waiting)&&e.jsx(s.Progress,{value:t.progress||0,className:"h-1.5"}),t.status===o.error&&e.jsx("p",{className:"text-xs text-destructive",children:"Erro ao enviar arquivo"}),t.status===o.duplicateItem&&e.jsx("p",{className:"text-xs text-warning",children:"Arquivo duplicado"}),t.status===o.canceled&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Upload cancelado"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[t.status===o.done&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:V(t.size)}),e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.ActionButton,{})}),e.jsxs(s.DropdownMenuContent,{align:"end",children:[c&&!u&&e.jsx(s.DropdownMenuItem,{onClick:()=>(e=>{const s=e.name.replace(e.extension,"");g(e.id),f(s)})(t),children:"Renomear"}),m&&e.jsx(s.DropdownMenuItem,{onClick:()=>m(t.id),children:"Visualizar"}),d&&e.jsx(s.DropdownMenuItem,{onClick:()=>d(t.id),children:"Download"}),l&&!u&&e.jsxs(e.Fragment,{children:[e.jsx(s.DropdownMenuSeparator,{}),e.jsx(s.DropdownMenuItem,{className:"text-destructive",onClick:()=>l(t.id),children:"Excluir"})]})]})]})]}),t.status===o.uploading&&e.jsx(s.Button,{variant:"outline",size:"sm",onClick:()=>l?.(t.id),children:"Cancelar"})]})]},t.id))}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(t.Paperclip,{className:"h-8 w-8 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"Nenhum anexo adicionado"})]})]})}function V(e){const{t:s}=r.useTranslation();if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB"][t]}`}exports.ActionPlanAttachmentsTab=z,exports.ActionPlanCommentsTab=B,exports.ActionPlanCostTab=L,exports.ActionPlanGeneralTab=C,exports.ActionPlanHistoryTab=E,exports.ActionPlanPage=function(a){const{formData:n,isLoading:l,isSaving:c,activeTab:d,isFormDisabled:o,updateField:m,setActiveTab:u,save:x,changeStatus:p,remove:g,cancel:j}=b(a),{t:f}=r.useTranslation(),{isNew:v=!1,config:N,users:S,places:w,actionTypes:D,causes:T,parentActions:_,progress:P,predecessors:A,availablePredecessors:M,costs:F,comments:R,history:V,attachments:U,attachmentsSlot:$,commentsSlot:O,historySlot:q,onAddPredecessor:H,onRemovePredecessor:W,onAddCost:G,onEditCost:K,onDeleteCost:X,onAddComment:J,onEditComment:Y,onDeleteComment:Q,onUploadAttachment:Z,onDeleteAttachment:ee,onRenameAttachment:se,onDownloadAttachment:te,onViewAttachment:ae}=a;if(l&&!n.id)return e.jsx(s.LoadingState,{isLoading:!0,children:e.jsx("div",{})});const ne=function(e){const{t:s}=r.useTranslation();if(!e)return[];return{[i.waitingStart]:[i.running,i.suspended,i.canceled],[i.running]:[i.effectivenessCheck,i.done,i.suspended,i.canceled],[i.effectivenessCheck]:[i.running,i.done,i.suspended,i.canceled],[i.done]:[i.running],[i.suspended]:[i.running,i.canceled],[i.canceled]:[i.waitingStart]}[e]||[]}(n.statusId);return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between border-b bg-card px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[j&&e.jsx(s.Button,{variant:"ghost",size:"icon",onClick:j,children:e.jsx(t.ArrowLeft,{className:"h-4 w-4"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-lg font-semibold",children:v?f("ap_new_action"):n.name||f("ap_action_plan")}),!v&&n.statusId&&e.jsx(y,{status:n.statusId})]}),n.code&&e.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:n.code})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[!v&&ne.length>0&&!o&&e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.Button,{variant:"outline",size:"sm",children:"Alterar Status"})}),e.jsx(s.DropdownMenuContent,{align:"end",children:ne.map(t=>e.jsx(s.DropdownMenuItem,{onClick:()=>p(t),children:h[t]},t))})]}),!v&&a.onDelete&&e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.Button,{variant:"ghost",size:"icon",children:e.jsx(t.MoreVertical,{className:"h-4 w-4"})})}),e.jsx(s.DropdownMenuContent,{align:"end",children:e.jsx(s.DropdownMenuItem,{className:"text-destructive",onClick:g,children:"Excluir"})})]})]})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e.jsx("div",{className:"max-w-4xl mx-auto px-6 py-6",children:e.jsxs(s.Tabs,{value:d,onValueChange:u,children:[e.jsxs(s.TabsList,{className:"mb-6",children:[e.jsx(s.TabsTrigger,{value:"general",children:"Geral"}),!v&&e.jsx(s.TabsTrigger,{value:"progress",children:"Progresso"}),!v&&N?.enablePredecessors&&e.jsx(s.TabsTrigger,{value:"predecessors",children:f("ap_predecessors")}),!v&&N?.enableCosts&&e.jsx(s.TabsTrigger,{value:"costs",children:"Custos"}),!v&&N?.enableAttachments&&e.jsx(s.TabsTrigger,{value:"attachments",children:f("ap_attachments")}),!v&&N?.enableComments&&e.jsx(s.TabsTrigger,{value:"comments",children:f("ap_comments")}),!v&&N?.enableHistory&&e.jsx(s.TabsTrigger,{value:"history",children:"Histórico"})]}),e.jsx(s.TabsContent,{value:"general",children:e.jsx(C,{formData:n,updateField:m,disabled:o,users:S,places:w,actionTypes:D,causes:T,parentActions:_,config:N})}),!v&&e.jsx(s.TabsContent,{value:"progress",children:e.jsx(k,{...a})}),!v&&N?.enablePredecessors&&e.jsx(s.TabsContent,{value:"predecessors",children:e.jsx(I,{predecessors:A,availablePredecessors:M,onAdd:H,onRemove:W,disabled:o})}),!v&&N?.enableCosts&&e.jsx(s.TabsContent,{value:"costs",children:e.jsx(L,{costs:F,onAdd:G,onEdit:K,onDelete:X,disabled:o})}),!v&&N?.enableAttachments&&e.jsx(s.TabsContent,{value:"attachments",children:$||e.jsx(z,{attachments:U,onUpload:Z,onDelete:ee,onRename:se,onDownload:te,onView:ae,disabled:o})}),!v&&N?.enableComments&&e.jsx(s.TabsContent,{value:"comments",children:O||e.jsx(B,{comments:R,onAdd:J,onEdit:Y,onDelete:Q,disabled:o})}),!v&&N?.enableHistory&&e.jsx(s.TabsContent,{value:"history",children:q||e.jsx(E,{history:V})})]})})}),e.jsxs("div",{className:"flex items-center justify-end gap-3 border-t bg-card px-6 py-4",children:[j&&e.jsx(s.Button,{variant:"outline",onClick:j,disabled:c,children:"Cancelar"}),e.jsx(s.Button,{onClick:x,disabled:c||o,children:c?"Salvando...":"Salvar"})]})]})},exports.ActionPlanPredecessorsTab=I,exports.ActionPlanProgressDialog=P,exports.ActionPlanProgressTab=k,exports.ActionPlanStatusBadge=y,exports.CLOSED_STATUSES=f,exports.DEFAULT_ACTION_TYPES=g,exports.EAttachmentItemStatus=o,exports.ETaskPlanAssociationType=c,exports.ETaskPlanPriority=l,exports.ETaskPlanStatus=i,exports.ETaskPlanTypeProgress=d,exports.PRIORITIES=j,exports.PROGRESS_ALLOWED_STATUSES=v,exports.STATUS_COLORS=m,exports.STATUS_LABELS=h,exports.STATUS_MAP=x,exports.STATUS_TEXT_COLORS=u,exports.formatTime=T,exports.formatTimeProgress=D,exports.getActionTypes=function(){return[{id:"immediate",label:a.t("ap_type_immediate")},{id:"corrective",label:a.t("ap_type_corrective")},{id:"preventive",label:a.t("ap_type_preventive")},{id:"improvement",label:a.t("ap_type_improvement")},{id:"standardization",label:a.t("ap_type_standardization")}]},exports.getPriorities=function(){return[{id:l.low,label:a.t("ap_priority_low"),color:"#4CAF50"},{id:l.medium,label:a.t("ap_priority_medium"),color:"#FF9800"},{id:l.high,label:a.t("ap_priority_high"),color:"#F44336"}]},exports.getProgressColor=_,exports.getStatusLabels=p,exports.useActionPlan=b,exports.useActionPlanProgress=w;
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),s=require("forlogic-core"),t=require("lucide-react"),a=require("i18next"),n=require("react"),r=require("react-i18next"),i=(e=>(e[e.waitingStart=1]="waitingStart",e[e.running=2]="running",e[e.effectivenessCheck=3]="effectivenessCheck",e[e.done=4]="done",e[e.suspended=5]="suspended",e[e.canceled=6]="canceled",e))(i||{}),l=(e=>(e[e.low=0]="low",e[e.medium=1]="medium",e[e.high=2]="high",e))(l||{}),c=(e=>(e[e.plan=2]="plan",e[e.occurrence=3]="occurrence",e[e.risk=4]="risk",e[e.decisions=5]="decisions",e[e.audit=6]="audit",e[e.strategyExtension=7]="strategyExtension",e[e.standardization=8]="standardization",e[e.supplier=9]="supplier",e[e.auditItems=10]="auditItems",e))(c||{}),d=(e=>(e[e.currentProgress=1]="currentProgress",e[e.cumulativeProgress=2]="cumulativeProgress",e))(d||{}),o=(e=>(e.uploading="uploading",e.waiting="waiting",e.done="done",e.error="error",e.canceled="canceled",e.duplicateItem="duplicateItem",e))(o||{});const m={[i.waitingStart]:"#D6D6D6",[i.running]:"#DAE9F4",[i.effectivenessCheck]:"#1B75BB29",[i.done]:"#DDEECA",[i.suspended]:"#FFF2D6",[i.canceled]:"#F4433629"},u={[i.waitingStart]:"#666666",[i.running]:"#1B75BB",[i.effectivenessCheck]:"#1B75BB",[i.done]:"#4CAF50",[i.suspended]:"#FF9800",[i.canceled]:"#F44336"},x={[i.waitingStart]:"waiting-start",[i.running]:"running",[i.effectivenessCheck]:"effectiveness-check",[i.done]:"done",[i.suspended]:"suspended",[i.canceled]:"canceled"};function p(){return{[i.waitingStart]:a.t("ap_status_waiting_start"),[i.running]:a.t("ap_status_running"),[i.effectivenessCheck]:a.t("ap_status_effectiveness_check"),[i.done]:a.t("ap_status_done"),[i.suspended]:a.t("ap_status_suspended"),[i.canceled]:a.t("ap_status_canceled")}}const h=new Proxy({},{get:(e,s)=>{if("symbol"==typeof s)return;return p()[s]}});const g=[{id:"immediate",label:"Imediata"},{id:"corrective",label:"Corretiva"},{id:"preventive",label:"Preventiva"},{id:"improvement",label:"Oportunidade de Melhoria"},{id:"standardization",label:"Padronização"}];const j=[{id:l.low,label:"Baixa",color:"#4CAF50"},{id:l.medium,label:"Média",color:"#FF9800"},{id:l.high,label:"Alta",color:"#F44336"}],f=[i.done,i.canceled],v=[i.waitingStart,i.running,i.effectivenessCheck,i.suspended];function b(e){const{actionPlan:s,isNew:t=!1,config:a,onSave:r,onCancel:i,onDelete:l,onChangeStatus:c}=e,[d,o]=n.useState({formData:s||{},isLoading:e.isLoading||!1,isSaving:!1,activeTab:"general",isFormDisabled:!1});n.useEffect(()=>{s&&o(e=>({...e,formData:s,isFormDisabled:a?.disableFields||f.includes(s.statusId)}))},[s,a?.disableFields]),n.useEffect(()=>{o(s=>({...s,isLoading:e.isLoading||!1}))},[e.isLoading]);const m=n.useCallback((e,s)=>{o(t=>({...t,formData:{...t.formData,[e]:s}}))},[]),u=n.useCallback(e=>{o(s=>({...s,activeTab:e}))},[]),x=n.useCallback(async()=>{if(r){o(e=>({...e,isSaving:!0}));try{await r(d.formData)}finally{o(e=>({...e,isSaving:!1}))}}},[r,d.formData]),p=n.useCallback(async e=>{if(c&&d.formData.id){o(e=>({...e,isLoading:!0}));try{await c(d.formData.id,e)}finally{o(e=>({...e,isLoading:!1}))}}},[c,d.formData.id]),h=n.useCallback(async()=>{if(l&&d.formData.id){o(e=>({...e,isLoading:!0}));try{await l(d.formData.id)}finally{o(e=>({...e,isLoading:!1}))}}},[l,d.formData.id]);return{formData:d.formData,isLoading:d.isLoading,isSaving:d.isSaving,activeTab:d.activeTab,isFormDisabled:d.isFormDisabled,updateField:m,setActiveTab:u,save:x,changeStatus:p,remove:h,cancel:i}}const N={[i.waitingStart]:{label:"",color:"#8B7355",icon:t.Clock},[i.running]:{label:"",color:"#2E7D5B",icon:t.Play},[i.effectivenessCheck]:{label:"",color:"#4A6FA5",icon:t.ShieldCheck},[i.done]:{label:"",color:"#3D7A40",icon:t.CheckCircle2},[i.suspended]:{label:"",color:"#6B7280",icon:t.Pause},[i.canceled]:{label:"",color:"#B44A4A",icon:t.X}};function y({status:t,labels:a,className:n,size:r,showIcon:i,variant:l}){const c=p(),d=N[t];if(!d)return null;const o=a?.[t]||c[t]||"";return e.jsx(s.StatusBadge,{label:o,color:d.color,icon:d.icon,size:r,showIcon:i,variant:l,className:n})}function S({formData:t,updateField:a,disabled:i=!1,users:l=[],places:c=[],actionTypes:d,causes:o=[],parentActions:m=[],config:u}){const{t:x}=r.useTranslation(),p=u?.requiredFields,h=d||g,f=e=>{if(u?.hiddenFields?.includes(e))return!1;if(u?.visibleFields&&u.visibleFields.length>0)return u.visibleFields.includes(e);const s=`${e}Visible`;return!p||!(s in p)||!1!==p[s]},v=e=>p?!!p[e]:"name"===e,b=n.useMemo(()=>{if(t.startDate&&t.endDate){const e=new Date(t.startDate),s=new Date(t.endDate).getTime()-e.getTime();return Math.max(0,Math.ceil(s/864e5))}return t.duration||0},[t.startDate,t.endDate,t.duration]);return e.jsxs("div",{className:"space-y-6 p-1",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("name")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Nome"}),e.jsx(s.Input,{value:t.name||"",onChange:e=>a("name",e.target.value),maxLength:500,disabled:i,placeholder:x("ap_plan_name_placeholder")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[f("responsibleWho")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("responsibleWho")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Responsável"}),e.jsxs(s.Select,{value:t.responsibleId||"",onValueChange:e=>a("responsibleId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_responsible")})}),e.jsx(s.SelectContent,{children:l.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.name},t.id))})]})]}),f("checkerWho")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("checkerWho")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Verificador"}),e.jsxs(s.Select,{value:t.checkerId||"",onValueChange:e=>a("checkerId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_checker")})}),e.jsx(s.SelectContent,{children:l.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.name},t.id))})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[f("place")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("place")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Local"}),e.jsxs(s.Select,{value:t.placeId||"",onValueChange:e=>a("placeId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_place")})}),e.jsx(s.SelectContent,{children:C(c).map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.name},t.id))})]})]}),f("planType")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("planType")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Tipo de Ação"}),e.jsxs(s.Select,{value:t.typeId||"",onValueChange:e=>a("typeId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_type")})}),e.jsx(s.SelectContent,{children:h.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.label},t.id))})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[f("priority")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("priority")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Prioridade"}),e.jsxs(s.Select,{value:t.priorityType?.toString()||"",onValueChange:e=>a("priorityType",Number(e)),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_priority")})}),e.jsx(s.SelectContent,{children:j.map(t=>e.jsx(s.SelectItem,{value:t.id.toString(),children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:t.color}}),t.label]})},t.id))})]})]}),m.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:x("ap_belongs_to")}),e.jsxs(s.Select,{value:t.parentId||"",onValueChange:e=>a("parentId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_parent")})}),e.jsx(s.SelectContent,{children:m.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.label},t.id))})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[f("startDate")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("startDate")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Data de Início"}),e.jsx(s.DatePicker,{date:t.startDate?new Date(t.startDate):void 0,onDateChange:e=>a("startDate",e||null),disabled:i,placeholder:x("ap_select_date")})]}),f("endDate")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("endDate")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Data de Término"}),e.jsx(s.DatePicker,{date:t.endDate?new Date(t.endDate):void 0,onDateChange:e=>a("endDate",e||null),disabled:i,placeholder:x("ap_select_date"),disabledDates:t.startDate?e=>e<new Date(t.startDate):void 0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:x("ap_duration_days")}),e.jsx(s.Input,{type:"number",value:b,disabled:!0,className:"bg-muted"})]})]}),f("estimatedCost")&&e.jsxs("div",{className:"space-y-2 max-w-xs",children:[e.jsx(s.Label,{className:s.cn(v("estimatedCost")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Custo Estimado"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground text-sm",children:"R$"}),e.jsx(s.Input,{type:"number",min:0,step:.01,value:t.estimatedCost||"",onChange:e=>a("estimatedCost",Number(e.target.value)),disabled:i,className:"pl-9",placeholder:"0,00"})]})]}),f("cause")&&o.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:"Causa"}),e.jsxs(s.Select,{value:t.causeId||"",onValueChange:e=>a("causeId",e),disabled:i,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:x("ap_select_cause")})}),e.jsx(s.SelectContent,{children:o.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.label},t.id))})]})]}),f("description")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("description")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Descrição"}),e.jsx(s.Textarea,{value:t.description||"",onChange:e=>a("description",e.target.value),maxLength:4e3,disabled:i,rows:4,placeholder:x("ap_description_placeholder")})]}),f("justification")&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{className:s.cn(v("justification")&&"after:content-['*'] after:ml-0.5 after:text-destructive"),children:"Justificativa"}),e.jsx(s.Textarea,{value:t.justification||"",onChange:e=>a("justification",e.target.value),maxLength:4e3,disabled:i,rows:4,placeholder:x("ap_justification_placeholder")})]})]})}function C(e,s=0){const t=[];for(const a of e)t.push({...a,depth:s}),a.children?.length&&t.push(...C(a.children,s+1));return t}function w(e){const{progress:s,onReportProgress:t,onEditProgress:a,onDeleteProgress:r}=e,[i,l]=n.useState(!1),[c,d]=n.useState(null),o=!!s&&v.includes(s.status),m=n.useCallback(async e=>{if(t&&s){l(!0);try{const a=100===e.percentProgress;await t({id:s.id,...e,conclude:a})}finally{l(!1)}}},[t,s]),u=n.useCallback(async e=>{if(a){l(!0);try{await a(e)}finally{l(!1),d(null)}}},[a]),x=n.useCallback(async e=>{if(r){l(!0);try{await r(e)}finally{l(!1)}}},[r]);return{progress:s,canReportProgress:o,isSubmitting:i,editingReport:c,setEditingReport:d,reportProgress:m,editProgress:u,deleteProgress:x}}function D(e){if(!e)return"";let s=(e||"").trim();if(!s)return"00:00";if(s.includes(":")){const e=s.split(":");if(e.length>=2){const s=e[0].replace(/\D/g,""),t=e[1].replace(/\D/g,"");let a=parseInt(s)||0,n=parseInt(t)||0;return a+=Math.floor(n/60),n%=60,`${a.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}}if(s=s.replace(/\D/g,""),!s)return"00:00";let t=0,a=0;return 4===s.length?(t=parseInt(s.substring(0,2))||0,a=parseInt(s.substring(2,4))||0,t+=Math.floor(a/60),a%=60):(t=parseInt(s)||0,a=0),`${t.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}function T(e){if(null==e)return"00:00";const s=String(e).replace(/\D/g,"");if(s.length<3){let e=parseInt(s)||0;const t=Math.floor(e/60);return e%=60,`${t.toString().padStart(2,"0")}:${e.toString().padStart(2,"0")}`}{const e=s.slice(-2),t=s.slice(0,-2);let a=parseInt(t)||0,n=parseInt(e)||0;return a+=Math.floor(n/60),n%=60,`${a.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}}function _(e){return 100===e?"#84c148":e>0?"#1b75bb":""}function P({open:t,onOpenChange:a,report:i,onSave:l,isSubmitting:c=!1}){const{t:d}=r.useTranslation(),[o,m]=n.useState(i?.percentProgress||0),[u,x]=n.useState(i?.timeProgress||""),[p,h]=n.useState(i?.comments||""),g=o!==(i?.percentProgress??0)||u!==(i?.timeProgress??"")||p!==(i?.comments??"");n.useEffect(()=>{i&&(m(i.percentProgress),x(i.timeProgress||""),h(i.comments||""))},[i]);return e.jsx(s.Dialog,{open:t,onOpenChange:a,children:e.jsxs(s.DialogContent,{className:"sm:max-w-md",variant:"form",isDirty:g,children:[e.jsx(s.DialogHeader,{children:e.jsx(s.DialogTitle,{children:d("ap_edit_progress")})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:d("ap_progress_percent")}),e.jsx(s.Input,{type:"number",min:0,max:100,value:o,onChange:e=>m(Number(e.target.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:d("ap_time_spent")}),e.jsx(s.Input,{value:u,onChange:e=>x(e.target.value),onBlur:()=>x(D(u)||""),placeholder:"00:00"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:d("ap_comments")}),e.jsx(s.Textarea,{value:p,onChange:e=>h(e.target.value),rows:3,maxLength:4e3})]})]}),e.jsxs(s.DialogFooter,{children:[e.jsx(s.Button,{variant:"secondary",onClick:()=>a(!1),disabled:c,children:"Cancelar"}),e.jsx(s.Button,{onClick:()=>{i&&l({...i,percentProgress:o,timeProgress:D(u)||"00:00",comments:p})},disabled:c,children:c?"Salvando...":"Salvar"})]})]})})}function A(t){const{t:a}=r.useTranslation(),{progress:i,canReportProgress:l,isSubmitting:c,editingReport:d,setEditingReport:o,reportProgress:m,editProgress:u,deleteProgress:x}=w(t),[p,h]=n.useState(""),[g,j]=n.useState(""),[f,v]=n.useState("");if(!i)return e.jsx("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:"Sem dados de progresso disponíveis"});const b=_(i.percentProgress),N=!p,y=!p&&!g&&!f;return e.jsxs("div",{className:"space-y-6 p-1",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"font-medium",children:a("ap_overall_progress")}),e.jsxs("span",{className:"font-semibold",style:{color:b||void 0},children:[i.percentProgress,"%"]})]}),e.jsx(s.Progress,{value:i.percentProgress,className:"h-3"}),i.timeProgress&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Tempo total: ",T(i.timeProgress)]})]}),l&&e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-4",children:[e.jsx("h4",{className:"text-sm font-medium",children:a("ap_report_progress")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:a("ap_progress_percent")}),e.jsx(s.Input,{type:"number",min:0,max:100,value:p,onChange:e=>h(e.target.value),placeholder:"0"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:a("ap_time_spent")}),e.jsx(s.Input,{value:g,onChange:e=>j(e.target.value),onBlur:()=>j(D(g)||""),placeholder:"00:00"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:a("ap_comments")}),e.jsx(s.Textarea,{value:f,onChange:e=>v(e.target.value),rows:3,maxLength:4e3,placeholder:a("ap_progress_comment_placeholder")})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(s.Button,{variant:"outline",size:"sm",onClick:()=>{h(""),j(""),v("")},disabled:y||c,children:"Limpar"}),e.jsx(s.Button,{size:"sm",onClick:async()=>{const e=Number(p);(e||0===e)&&(await m({percentProgress:e,timeProgress:D(g)||"00:00",comments:f}),h(""),j(""),v(""))},disabled:N||c,children:c?"Reportando...":"Reportar"})]})]}),i.reports.length>0&&e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-sm font-medium",children:a("ap_reports_history")}),e.jsx("div",{className:"space-y-2",children:i.reports.map(s=>e.jsx(k,{report:s,onEdit:()=>o(s),onDelete:()=>x(s.id),disabled:!l},s.id))})]}),e.jsx(P,{open:!!d,onOpenChange:e=>!e&&o(null),report:d,onSave:u,isSubmitting:c})]})}function k({report:t,onEdit:a,onDelete:n,disabled:r}){const i=t.date?new Date(t.date):null,l=_(t.percentProgress);return e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border bg-card p-3",children:[e.jsx("div",{className:"flex-shrink-0 h-8 w-8 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground",children:t.userName?.charAt(0)?.toUpperCase()||"?"}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"font-medium truncate",children:t.userName}),i&&e.jsx("span",{className:"text-xs text-muted-foreground",children:i.toLocaleDateString("pt-BR")})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{style:{color:l||void 0},className:"font-semibold",children:[t.percentProgress,"%"]}),t.timeProgress&&e.jsxs("span",{children:["Tempo: ",T(t.timeProgress)]})]}),t.comments&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:t.comments})]}),!r&&e.jsx(s.TableRowActions,{onEdit:a,onDelete:n})]})}function L({predecessors:a=[],availablePredecessors:i=[],onAdd:l,onRemove:c,disabled:d=!1}){const{t:o}=r.useTranslation(),[m,u]=n.useState(""),x=i.filter(e=>!a.some(s=>s.predecessorId===e.id));return e.jsxs("div",{className:"space-y-6 p-1",children:[!d&&x.length>0&&e.jsxs("div",{className:"flex items-end gap-3",children:[e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(s.Label,{children:o("ap_add_predecessor")}),e.jsxs(s.Select,{value:m,onValueChange:u,children:[e.jsx(s.SelectTrigger,{children:e.jsx(s.SelectValue,{placeholder:o("ap_select_action")})}),e.jsx(s.SelectContent,{children:x.map(t=>e.jsx(s.SelectItem,{value:t.id,children:t.label},t.id))})]})]}),e.jsxs(s.Button,{size:"sm",onClick:()=>{m&&l&&(l(m),u(""))},disabled:!m,children:[e.jsx(t.Plus,{className:"h-4 w-4 mr-1"}),"Adicionar"]})]}),a.length>0?e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[t.predecessorCode&&e.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:t.predecessorCode}),e.jsx("span",{className:"text-sm font-medium",children:t.predecessorName}),null!=t.predecessorStatus&&e.jsx(y,{status:t.predecessorStatus})]}),!d&&c&&e.jsx(s.TableRowActions,{onDelete:()=>c(t.predecessorId)})]},t.id))}):e.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Nenhum predecessor adicionado"})]})}function I({costs:a=[],onAdd:i,onEdit:l,onDelete:c,disabled:d=!1}){const{t:o}=r.useTranslation(),[m,u]=n.useState(""),[x,p]=n.useState(""),h=a.reduce((e,s)=>e+(s.value||0),0);return e.jsxs("div",{className:"space-y-6 p-1",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-medium",children:o("ap_total_cost")}),e.jsxs("span",{className:"text-lg font-semibold text-foreground",children:["R$ ",h.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),!d&&i&&e.jsxs("div",{className:"rounded-lg border bg-card p-4 space-y-4",children:[e.jsx("h4",{className:"text-sm font-medium",children:o("ap_add_cost")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:"Descrição"}),e.jsx(s.Input,{value:m,onChange:e=>u(e.target.value),placeholder:o("ap_cost_description")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Label,{children:"Valor (R$)"}),e.jsx(s.Input,{type:"number",min:0,step:.01,value:x,onChange:e=>p(e.target.value),placeholder:"0,00"})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(s.Button,{size:"sm",onClick:()=>{m&&x&&i&&(i({description:m,value:Number(x),date:(new Date).toISOString()}),u(""),p(""))},disabled:!m||!x,children:[e.jsx(t.Plus,{className:"h-4 w-4 mr-1"}),"Adicionar"]})})]}),a.length>0?e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:t.description}),t.date&&e.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(t.date).toLocaleDateString("pt-BR")})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-semibold whitespace-nowrap",children:["R$ ",t.value.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]}),!d&&(l||c)&&e.jsx(s.TableRowActions,{onEdit:l?()=>l(t):void 0,onDelete:c?()=>c(t.id):void 0})]})]},t.id))}):e.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Nenhum custo registrado"})]})}function B({comments:a=[],currentUserId:i,onAdd:l,onEdit:c,onDelete:d,disabled:o=!1,maxLength:m=4e3}){const{t:u}=r.useTranslation(),[x,p]=n.useState(""),[h,g]=n.useState(!1),[j,f]=n.useState(null),[v,b]=n.useState(""),N=()=>{f(null),b("")};return e.jsxs("div",{className:"space-y-6 p-1",children:[!o&&l&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(s.Textarea,{value:x,onChange:e=>p(e.target.value),placeholder:u("ap_add_comment_placeholder"),maxLength:m,rows:3}),e.jsxs("div",{className:"flex items-center justify-between",children:[m&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:[x.length,"/",m]}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsx(s.Button,{variant:"outline",size:"sm",onClick:()=>p(""),disabled:!x||h,children:"Limpar"}),e.jsx(s.Button,{size:"sm",onClick:async()=>{if(x.trim()&&l){g(!0);try{await l(x),p("")}finally{g(!1)}}},disabled:!x.trim()||h,children:h?"Enviando...":"Comentar"})]})]})]}),e.jsxs("div",{className:"space-y-1",children:[a.length>0?e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("span",{className:"text-sm font-medium",children:u("ap_comments")}),e.jsx(s.Badge,{variant:"info",className:"text-[10px] px-1.5 py-0",children:a.length})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(t.MessageSquare,{className:"h-8 w-8 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"Nenhum comentário adicionado"})]}),a.map(t=>e.jsxs("div",{className:"flex gap-3 rounded-lg border bg-card p-3",children:[e.jsx("div",{className:"flex-shrink-0 h-8 w-8 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground overflow-hidden",children:t.userPhotoUrl?e.jsx("img",{src:t.userPhotoUrl,alt:t.userName,className:"h-full w-full object-cover"}):t.userName?.charAt(0)?.toUpperCase()||"?"}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"font-medium truncate",children:t.userName}),t.userEmail&&e.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.userEmail}),e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:E(t.dateEdited||t.dateCreation)}),t.dateEdited&&e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"editado"})]}),j===t.id?e.jsxs("div",{className:"space-y-2",children:[e.jsx(s.Textarea,{value:v,onChange:e=>b(e.target.value),maxLength:m,rows:3}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(s.Button,{variant:"outline",size:"sm",onClick:N,disabled:h,children:"Cancelar"}),e.jsx(s.Button,{size:"sm",onClick:()=>(async e=>{if(v.trim()&&c){g(!0);try{await c({...e,text:v,stringText:v}),f(null),b("")}finally{g(!1)}}})(t),disabled:!v.trim()||h,children:h?"Salvando...":"Salvar"})]})]}):e.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:t.stringText||t.text})]}),!o&&i===t.userId&&j!==t.id&&e.jsx(s.TableRowActions,{onEdit:c?()=>(e=>{f(e.id),b(e.stringText||e.text)})(t):void 0,onDelete:d?()=>(async e=>{if(d){g(!0);try{await d(e)}finally{g(!1)}}})(t.id):void 0})]},t.id))]})]})}function E(e){const{t:s}=r.useTranslation();if(!e)return"";const t=new Date(e);return`${t.toLocaleDateString("pt-BR")} ${t.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}`}function F({history:s=[],isLoading:a=!1}){const{t:n}=r.useTranslation();return a?e.jsx("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:"Carregando histórico..."}):0===s.length?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(t.Clock,{className:"h-8 w-8 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:n("ap_no_history")})]}):e.jsx("div",{className:"p-1",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-4 top-0 bottom-0 w-px bg-border"}),e.jsx("div",{className:"space-y-0",children:s.map((s,a)=>e.jsxs("div",{className:"relative flex gap-4 pb-6 last:pb-0",children:[e.jsx("div",{className:"relative z-10 flex-shrink-0 h-8 w-8 rounded-full bg-primary/10 border-2 border-primary/30 flex items-center justify-center",children:s.icon?e.jsx("span",{className:"text-xs text-primary",children:s.icon}):e.jsx("div",{className:"h-2 w-2 rounded-full bg-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0 rounded-lg border bg-card p-3 space-y-2",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium",children:s.translateEvent||s.eventName}),s.eventDescription&&e.jsx("p",{className:"text-xs text-muted-foreground",children:s.eventDescription})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-shrink-0 h-6 w-6 rounded-full bg-muted overflow-hidden flex items-center justify-center text-[10px] font-medium text-muted-foreground",children:s.userPhotoUrl?e.jsx("img",{src:s.userPhotoUrl,alt:s.userName,className:"h-full w-full object-cover"}):s.userName?.charAt(0)?.toUpperCase()||"?"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-xs font-medium truncate block",children:s.userName}),s.userEmail&&e.jsx("span",{className:"text-[10px] text-muted-foreground truncate block",children:s.userEmail})]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(t.Calendar,{className:"h-3 w-3"}),e.jsx("span",{children:R(s.date)})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(t.Clock,{className:"h-3 w-3"}),e.jsx("span",{children:z(s.date)})]}),s.isMobileRequest&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(t.Smartphone,{className:"h-3 w-3"}),e.jsx("span",{children:n("ap_via_app")})]})]})]})]},s.id))})]})})}function R(e){const{t:s}=r.useTranslation();return new Date(e).toLocaleDateString("pt-BR")}function z(e){const{t:s}=r.useTranslation();return new Date(e).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}function M({attachments:a=[],onUpload:i,onDelete:l,onRename:c,onDownload:d,onView:m,disabled:u=!1}){const{t:x}=r.useTranslation(),p=n.useRef(null),[h,g]=n.useState(null),[j,f]=n.useState(""),v=async e=>{j.trim()&&c&&(await c(e.id,j),g(null),f(""))},b=()=>{g(null),f("")};return e.jsxs("div",{className:"space-y-4 p-1",children:[!u&&i&&e.jsxs(e.Fragment,{children:[e.jsx("input",{ref:p,type:"file",multiple:!0,className:"hidden",onChange:e=>{const s=e.target.files;if(s&&i){for(let e=0;e<s.length;e++){const t=s.item(e);t&&i(t)}p.current&&(p.current.value="")}}}),e.jsxs(s.Button,{size:"sm",onClick:()=>p.current?.click(),children:[e.jsx(t.Plus,{className:"h-4 w-4 mr-1"}),"Adicionar anexo"]})]}),a.length>0?e.jsx("div",{className:"space-y-2",children:a.map(a=>e.jsxs("div",{className:s.cn("flex items-center gap-3 rounded-lg border bg-card p-3",a.status===o.error&&"border-destructive/50 bg-destructive/5",a.status===o.canceled&&"opacity-50"),children:[e.jsx("div",{className:"flex-shrink-0 h-9 w-9 rounded bg-muted flex items-center justify-center",children:e.jsx("span",{className:"text-[10px] font-bold uppercase text-muted-foreground",children:a.extension.replace(".","").substring(0,4)})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[h===a.id?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{className:"flex-1 text-sm border rounded px-2 py-1 bg-background",value:j,onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"===e.key&&v(a),"Escape"===e.key&&b()},autoFocus:!0}),e.jsx(s.Button,{size:"sm",variant:"outline",onClick:b,children:x("cancel")}),e.jsx(s.Button,{size:"sm",onClick:()=>v(a),children:x("save")})]}):e.jsx("button",{type:"button",className:"text-sm font-medium truncate block text-left hover:underline cursor-pointer",onClick:()=>m?.(a.id),children:a.name}),(a.status===o.uploading||a.status===o.waiting)&&e.jsx(s.Progress,{value:a.progress||0,className:"h-1.5"}),a.status===o.error&&e.jsx("p",{className:"text-xs text-destructive",children:"Erro ao enviar arquivo"}),a.status===o.duplicateItem&&e.jsx("p",{className:"text-xs text-warning",children:"Arquivo duplicado"}),a.status===o.canceled&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Upload cancelado"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[a.status===o.done&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:V(a.size)}),e.jsx(s.TableRowActions,{onDelete:l&&!u?()=>l(a.id):void 0,customActions:[{label:"Renomear",icon:t.Pencil,onClick:()=>(e=>{const s=e.name.replace(e.extension,"");g(e.id),f(s)})(a),show:!!c&&!u},{label:"Visualizar",icon:t.Eye,onClick:()=>m?.(a.id),show:!!m},{label:"Download",icon:t.Download,onClick:()=>d?.(a.id),show:!!d}]})]}),a.status===o.uploading&&e.jsx(s.Button,{variant:"outline",size:"sm",onClick:()=>l?.(a.id),children:"Cancelar"})]})]},a.id))}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[e.jsx(t.Paperclip,{className:"h-8 w-8 mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"Nenhum anexo adicionado"})]})]})}function V(e){const{t:s}=r.useTranslation();if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,t)).toFixed(1))} ${["B","KB","MB","GB"][t]}`}exports.ActionPlanAttachmentsTab=M,exports.ActionPlanCommentsTab=B,exports.ActionPlanCostTab=I,exports.ActionPlanGeneralTab=S,exports.ActionPlanHistoryTab=F,exports.ActionPlanPage=function(a){const{formData:n,isLoading:l,isSaving:c,activeTab:d,isFormDisabled:o,updateField:m,setActiveTab:u,save:x,changeStatus:p,remove:g,cancel:j}=b(a),{t:f}=r.useTranslation(),{isNew:v=!1,config:N,users:C,places:w,actionTypes:D,causes:T,parentActions:_,progress:P,predecessors:k,availablePredecessors:E,costs:R,comments:z,history:V,attachments:U,attachmentsSlot:$,commentsSlot:O,historySlot:q,onAddPredecessor:H,onRemovePredecessor:W,onAddCost:G,onEditCost:K,onDeleteCost:X,onAddComment:J,onEditComment:Y,onDeleteComment:Q,onUploadAttachment:Z,onDeleteAttachment:ee,onRenameAttachment:se,onDownloadAttachment:te,onViewAttachment:ae}=a;if(l&&!n.id)return e.jsx(s.LoadingState,{isLoading:!0,children:e.jsx("div",{})});const ne=function(e){const{t:s}=r.useTranslation();if(!e)return[];return{[i.waitingStart]:[i.running,i.suspended,i.canceled],[i.running]:[i.effectivenessCheck,i.done,i.suspended,i.canceled],[i.effectivenessCheck]:[i.running,i.done,i.suspended,i.canceled],[i.done]:[i.running],[i.suspended]:[i.running,i.canceled],[i.canceled]:[i.waitingStart]}[e]||[]}(n.statusId);return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between border-b bg-card px-6 py-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[j&&e.jsx(s.Button,{variant:"ghost",size:"icon",onClick:j,children:e.jsx(t.ArrowLeft,{className:"h-4 w-4"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-lg font-semibold",children:v?f("ap_new_action"):n.name||f("ap_action_plan")}),!v&&n.statusId&&e.jsx(y,{status:n.statusId})]}),n.code&&e.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:n.code})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[!v&&ne.length>0&&!o&&e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.Button,{variant:"outline",size:"sm",children:"Alterar Status"})}),e.jsx(s.DropdownMenuContent,{align:"end",children:ne.map(t=>e.jsx(s.DropdownMenuItem,{onClick:()=>p(t),children:h[t]},t))})]}),!v&&a.onDelete&&e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsx(s.Button,{variant:"ghost",size:"icon",children:e.jsx(t.MoreVertical,{className:"h-4 w-4"})})}),e.jsx(s.DropdownMenuContent,{align:"end",children:e.jsx(s.DropdownMenuItem,{className:"text-destructive",onClick:g,children:"Excluir"})})]})]})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e.jsx("div",{className:"ds-page-shell",children:e.jsxs(s.Tabs,{value:d,onValueChange:u,children:[e.jsxs(s.TabsList,{className:"mb-6",children:[e.jsx(s.TabsTrigger,{value:"general",children:"Geral"}),!v&&e.jsx(s.TabsTrigger,{value:"progress",children:"Progresso"}),!v&&N?.enablePredecessors&&e.jsx(s.TabsTrigger,{value:"predecessors",children:f("ap_predecessors")}),!v&&N?.enableCosts&&e.jsx(s.TabsTrigger,{value:"costs",children:"Custos"}),!v&&N?.enableAttachments&&e.jsx(s.TabsTrigger,{value:"attachments",children:f("ap_attachments")}),!v&&N?.enableComments&&e.jsx(s.TabsTrigger,{value:"comments",children:f("ap_comments")}),!v&&N?.enableHistory&&e.jsx(s.TabsTrigger,{value:"history",children:"Histórico"})]}),e.jsx(s.TabsContent,{value:"general",children:e.jsx(S,{formData:n,updateField:m,disabled:o,users:C,places:w,actionTypes:D,causes:T,parentActions:_,config:N})}),!v&&e.jsx(s.TabsContent,{value:"progress",children:e.jsx(A,{...a})}),!v&&N?.enablePredecessors&&e.jsx(s.TabsContent,{value:"predecessors",children:e.jsx(L,{predecessors:k,availablePredecessors:E,onAdd:H,onRemove:W,disabled:o})}),!v&&N?.enableCosts&&e.jsx(s.TabsContent,{value:"costs",children:e.jsx(I,{costs:R,onAdd:G,onEdit:K,onDelete:X,disabled:o})}),!v&&N?.enableAttachments&&e.jsx(s.TabsContent,{value:"attachments",children:$||e.jsx(M,{attachments:U,onUpload:Z,onDelete:ee,onRename:se,onDownload:te,onView:ae,disabled:o})}),!v&&N?.enableComments&&e.jsx(s.TabsContent,{value:"comments",children:O||e.jsx(B,{comments:z,onAdd:J,onEdit:Y,onDelete:Q,disabled:o})}),!v&&N?.enableHistory&&e.jsx(s.TabsContent,{value:"history",children:q||e.jsx(F,{history:V})})]})})}),e.jsxs("div",{className:"flex items-center justify-end gap-3 border-t bg-card px-6 py-4",children:[j&&e.jsx(s.Button,{variant:"secondary",onClick:j,disabled:c,children:"Cancelar"}),e.jsx(s.Button,{onClick:x,disabled:c||o,children:c?"Salvando...":"Salvar"})]})]})},exports.ActionPlanPredecessorsTab=L,exports.ActionPlanProgressDialog=P,exports.ActionPlanProgressTab=A,exports.ActionPlanStatusBadge=y,exports.CLOSED_STATUSES=f,exports.DEFAULT_ACTION_TYPES=g,exports.EAttachmentItemStatus=o,exports.ETaskPlanAssociationType=c,exports.ETaskPlanPriority=l,exports.ETaskPlanStatus=i,exports.ETaskPlanTypeProgress=d,exports.PRIORITIES=j,exports.PROGRESS_ALLOWED_STATUSES=v,exports.STATUS_COLORS=m,exports.STATUS_LABELS=h,exports.STATUS_MAP=x,exports.STATUS_TEXT_COLORS=u,exports.formatTime=T,exports.formatTimeProgress=D,exports.getActionTypes=function(){return[{id:"immediate",label:a.t("ap_type_immediate")},{id:"corrective",label:a.t("ap_type_corrective")},{id:"preventive",label:a.t("ap_type_preventive")},{id:"improvement",label:a.t("ap_type_improvement")},{id:"standardization",label:a.t("ap_type_standardization")}]},exports.getPriorities=function(){return[{id:l.low,label:a.t("ap_priority_low"),color:"#4CAF50"},{id:l.medium,label:a.t("ap_priority_medium"),color:"#FF9800"},{id:l.high,label:a.t("ap_priority_high"),color:"#F44336"}]},exports.getProgressColor=_,exports.getStatusLabels=p,exports.useActionPlan=b,exports.useActionPlanProgress=w;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|