forlogic-core 2.1.4 → 2.2.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/.note/memory/features/import/attachment-idempotency-registry.md +8 -8
- package/.note/memory/features/import/attachment-strategy.md +30 -30
- package/.note/memory/patterns/admin-i18n-policy.md +20 -20
- package/.note/memory/patterns/alias-url-resolution.md +69 -69
- package/.note/memory/patterns/doc-sync-rule.md +35 -35
- package/.note/memory/patterns/documentation-standard.md +17 -17
- package/.note/memory/patterns/dynamic-supabase-config.md +4 -4
- package/.note/memory/patterns/environment-detection-logic.md +35 -35
- package/.note/memory/patterns/i18n-architecture.md +3 -3
- package/README.md +120 -68
- package/dist/action-plans/components/ActionPlanAttachmentsTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanCommentsTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanCostTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanGeneralTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanHistoryTab.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanPredecessorsTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanProgressDialog.d.ts +3 -0
- package/dist/action-plans/components/ActionPlanProgressTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanStatusBadge.d.ts +9 -2
- package/dist/action-plans/constants.d.ts +24 -0
- package/dist/action-plans/hooks/useActionPlan.d.ts +5 -0
- package/dist/action-plans/hooks/useActionPlanProgress.d.ts +5 -0
- package/dist/action-plans/types.d.ts +60 -0
- package/dist/action-plans/utils/formatTime.d.ts +9 -0
- package/dist/audit-trail/components/AuditTrailDetails.d.ts +10 -0
- package/dist/audit-trail/components/AuditTrailFilter.d.ts +10 -0
- package/dist/audit-trail/components/AuditTrailPage.d.ts +10 -0
- package/dist/audit-trail/types.d.ts +58 -0
- package/dist/audit-trail/utils.d.ts +18 -2
- package/dist/auth/components/EditProfileDialog.d.ts +1 -0
- package/dist/auth/components/ProtectedRoute.d.ts +5 -0
- package/dist/auth/contexts/AuthContext.d.ts +5 -0
- package/dist/auth/pages/CallbackPage.d.ts +5 -0
- package/dist/auth/services/AuthService.d.ts +5 -0
- package/dist/auth/services/TokenManager.d.ts +5 -0
- package/dist/auth/services/TokenService.d.ts +10 -0
- package/dist/auth/utils/ErrorInterceptor.d.ts +5 -0
- package/dist/components/dashboards/dashboard-form.d.ts +15 -0
- package/dist/components/dashboards/dashboard-general-view.d.ts +15 -0
- package/dist/components/dashboards/dashboard-grid.d.ts +25 -0
- package/dist/components/dashboards/dashboard-list.d.ts +10 -0
- package/dist/components/dashboards/dashboard-panel-renderer.d.ts +10 -0
- package/dist/components/dashboards/dashboard-view.d.ts +10 -0
- package/dist/components/dashboards/helpers.d.ts +44 -5
- package/dist/components/dashboards/panels/burndown-panel.d.ts +15 -0
- package/dist/components/dashboards/panels/cartesian-panel.d.ts +20 -0
- package/dist/components/dashboards/panels/list-panel.d.ts +15 -0
- package/dist/components/dashboards/panels/matrix-risk-panel.d.ts +25 -0
- package/dist/components/dashboards/panels/numeric-panel.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-error.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-header.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-loader.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-no-data.d.ts +10 -0
- package/dist/components/dashboards/panels/panel-unavailable.d.ts +10 -0
- package/dist/components/dashboards/panels/pareto-panel.d.ts +10 -0
- package/dist/components/dashboards/panels/performance-panel.d.ts +15 -0
- package/dist/components/dashboards/panels/pie-panel.d.ts +10 -0
- package/dist/components/dashboards/panels/text-panel.d.ts +10 -0
- package/dist/components/dashboards/types.d.ts +230 -0
- package/dist/components/modules/AccessDeniedDialog.d.ts +3 -1
- package/dist/components/modules/ModuleAccessGuard.d.ts +3 -1
- package/dist/components/modules/ModulesContent.d.ts +3 -1
- package/dist/components/modules/ModulesDialog.d.ts +1 -1
- package/dist/components/modules/ModulesFooterCards.d.ts +3 -1
- package/dist/components/modules/types.d.ts +2 -0
- package/dist/components/ui/accordion.d.ts +35 -0
- package/dist/components/ui/action-button.d.ts +5 -0
- package/dist/components/ui/alert-dialog.d.ts +82 -0
- package/dist/components/ui/alert.d.ts +32 -0
- package/dist/components/ui/avatar.d.ts +30 -0
- package/dist/components/ui/badge.d.ts +32 -0
- package/dist/components/ui/breadcrumb.d.ts +54 -0
- package/dist/components/ui/button-group.d.ts +15 -0
- package/dist/components/ui/button.d.ts +55 -0
- package/dist/components/ui/calendar.d.ts +16 -0
- package/dist/components/ui/card.d.ts +49 -0
- package/dist/components/ui/chart.d.ts +35 -0
- package/dist/components/ui/checkbox.d.ts +11 -0
- package/dist/components/ui/collapsible.d.ts +15 -0
- package/dist/components/ui/color-picker.d.ts +5 -0
- package/dist/components/ui/combo-tree.d.ts +23 -0
- package/dist/components/ui/combobox.d.ts +28 -0
- package/dist/components/ui/command.d.ts +66 -0
- package/dist/components/ui/context-menu.d.ts +95 -0
- package/dist/components/ui/date-picker.d.ts +10 -0
- package/dist/components/ui/dialog-wizard.d.ts +22 -4
- package/dist/components/ui/dialog.d.ts +181 -0
- package/dist/components/ui/drawer.d.ts +72 -0
- package/dist/components/ui/dropdown-menu.d.ts +153 -0
- package/dist/components/ui/electronic-signature-dialog.d.ts +10 -0
- package/dist/components/ui/export-dialog.d.ts +20 -0
- package/dist/components/ui/form.d.ts +96 -0
- package/dist/components/ui/hover-card.d.ts +15 -0
- package/dist/components/ui/icon-picker.d.ts +5 -0
- package/dist/components/ui/iframe-dialog.d.ts +10 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/menubar.d.ts +80 -0
- package/dist/components/ui/multiselect-permissions.d.ts +25 -0
- package/dist/components/ui/navigation-menu.d.ts +45 -0
- package/dist/components/ui/onboarding-dialog.d.ts +15 -0
- package/dist/components/ui/online-editor-dialog.d.ts +10 -0
- package/dist/components/ui/pagination.d.ts +53 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/radio-group.d.ts +3 -0
- package/dist/components/ui/report-request-list.d.ts +20 -0
- package/dist/components/ui/resizable.d.ts +15 -0
- package/dist/components/ui/rich-text-editor.d.ts +13 -0
- package/dist/components/ui/scroll-area.d.ts +3 -0
- package/dist/components/ui/select.d.ts +71 -0
- package/dist/components/ui/separator.d.ts +13 -0
- package/dist/components/ui/sheet.d.ts +76 -0
- package/dist/components/ui/sidebar.d.ts +203 -0
- package/dist/components/ui/skeleton-variants.d.ts +25 -0
- package/dist/components/ui/skeleton.d.ts +12 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/spinner.d.ts +5 -0
- package/dist/components/ui/split-button.d.ts +6 -0
- package/dist/components/ui/stack.d.ts +5 -0
- package/dist/components/ui/status-badge.d.ts +52 -0
- package/dist/components/ui/step-selector.d.ts +5 -0
- package/dist/components/ui/stimulsoft-viewer.d.ts +8 -0
- package/dist/components/ui/switch.d.ts +21 -0
- package/dist/components/ui/tab-page-layout.d.ts +33 -0
- package/dist/components/ui/table-resize-handle.d.ts +10 -3
- package/dist/components/ui/table.d.ts +102 -0
- package/dist/components/ui/tabs.d.ts +59 -0
- package/dist/components/ui/terms-of-use-dialog.d.ts +50 -4
- package/dist/components/ui/textarea.d.ts +27 -0
- package/dist/components/ui/timepicker.d.ts +23 -0
- package/dist/components/ui/toggle-group.d.ts +25 -0
- package/dist/components/ui/toggle.d.ts +21 -0
- package/dist/components/ui/tooltip.d.ts +48 -0
- package/dist/components/ui/truncated-cell.d.ts +13 -0
- package/dist/components/ui/typography.d.ts +119 -0
- package/dist/components/ui/updates-notification.d.ts +33 -0
- package/dist/components/ui/users-groups-selector.d.ts +43 -0
- package/dist/components/ui/viewer-dialog.d.ts +107 -0
- package/dist/crud/components/ActionMenuItems.d.ts +5 -0
- package/dist/crud/components/BaseForm.d.ts +46 -0
- package/dist/crud/components/ColumnSettingsPopover.d.ts +10 -0
- package/dist/crud/components/CrudActionBar.d.ts +20 -0
- package/dist/crud/components/CrudGrid.d.ts +10 -0
- package/dist/crud/components/CrudPagination.d.ts +5 -0
- package/dist/crud/components/CrudTable.d.ts +5 -0
- package/dist/crud/components/TableRowActions.d.ts +5 -0
- package/dist/crud/createCrudPage.d.ts +41 -8
- package/dist/crud/generateCrudConfig.d.ts +13 -8
- package/dist/crud/hooks/useBaseForm.d.ts +39 -0
- package/dist/crud/hooks/useColumnManager.d.ts +25 -0
- package/dist/crud/hooks/useCrud.d.ts +35 -0
- package/dist/crud/primitives/ActionMenu.d.ts +41 -0
- package/dist/crud/primitives/FilterBar.d.ts +45 -0
- package/dist/crud/primitives/Pagination.d.ts +5 -0
- package/dist/crud/primitives/Table.d.ts +6 -1
- package/dist/crud/primitives/TreeTable.d.ts +5 -0
- package/dist/crud/primitives/types.d.ts +63 -0
- package/dist/crud/utils/routingHelpers.d.ts +11 -0
- package/dist/custom-form-fields/components/CustomFormFields.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormDateField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormMultiSelectionField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormNumericField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormQuestionsField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormSingleSelectionField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormTextField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormTimeField.d.ts +3 -0
- package/dist/custom-form-fields/fields/FormUrlField.d.ts +3 -0
- package/dist/custom-form-fields/fields/ReadOnlyTextField.d.ts +3 -0
- package/dist/custom-form-fields/types.d.ts +84 -21
- package/dist/exports/crud.d.ts +5 -0
- package/dist/exports/integrations.d.ts +1 -0
- package/dist/exports/ui.d.ts +1 -0
- package/dist/file-upload/components/SingleFileUpload.d.ts +59 -0
- package/dist/file-upload/types.d.ts +15 -0
- package/dist/file-upload/utils/formatBytes.d.ts +5 -0
- package/dist/file-upload/utils/getFileExtension.d.ts +5 -0
- package/dist/hooks/useColumnResize.d.ts +24 -0
- package/dist/hooks/useRowResize.d.ts +18 -0
- package/dist/hooks/useSidebarResize.d.ts +18 -0
- package/dist/hooks/useUpdatesNotification.d.ts +16 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/clarity/clarityTracking.d.ts +31 -0
- package/dist/integrations/clarity/index.d.ts +3 -0
- package/dist/integrations/clarity/types.d.ts +46 -0
- package/dist/integrations/clarity/useClarity.d.ts +34 -0
- package/dist/integrations/index.d.ts +5 -0
- package/dist/providers/CoreProviders.d.ts +16 -1
- package/dist/qualiex/components/QualiexUserField.d.ts +8 -0
- package/dist/qualiex/hooks/useQualiexUsers.d.ts +16 -26
- package/dist/qualiex/services/qualiexApi.d.ts +38 -2
- package/dist/qualiex/utils/QualiexErrorInterceptor.d.ts +5 -0
- package/dist/supabase/SupabaseSingleton.d.ts +34 -0
- package/dist/types.d.ts +51 -2
- package/dist/utils/color.d.ts +26 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/vite/index.esm.js +4 -1
- package/dist/vite/index.js +4 -1
- package/docs/PUBLISH.md +168 -0
- package/docs/STORAGE_BUCKETS.md +384 -0
- package/docs/WORKSPACE_KNOWLEDGE.md +120 -119
- package/docs/design-system/README.md +1 -1
- package/docs/design-system/buttons-actions.md +130 -130
- package/docs/design-system/charts-dashboards.md +340 -301
- package/docs/design-system/crud.md +174 -114
- package/docs/design-system/data-display.md +108 -103
- package/docs/design-system/dialogs.md +212 -212
- package/docs/design-system/domain.md +317 -317
- package/docs/design-system/examples.md +275 -275
- package/docs/design-system/foundation.md +1 -1
- package/docs/design-system/inputs.md +131 -131
- package/docs/design-system/layout.md +202 -154
- package/docs/design-system/navigation.md +271 -325
- package/docs/design-system/notifications-feedback.md +34 -34
- package/docs/design-system/patterns/README.md +53 -53
- package/docs/design-system/patterns/action-button.md +22 -22
- package/docs/design-system/patterns/alertdialog-deletion.md +46 -46
- package/docs/design-system/patterns/baseform-custom-fields.md +59 -59
- package/docs/design-system/patterns/baseform-usage.md +42 -42
- package/docs/design-system/patterns/body-content-scroll.md +56 -56
- package/docs/design-system/patterns/combo-tree.md +23 -23
- package/docs/design-system/patterns/components-registry.md +17 -17
- package/docs/design-system/patterns/core-providers.md +41 -39
- package/docs/design-system/patterns/crud-bulk-actions.md +12 -12
- package/docs/design-system/patterns/crud-config-props.md +16 -16
- package/docs/design-system/patterns/crud-defaults.md +17 -17
- package/docs/design-system/patterns/crud-toolbar.md +28 -28
- package/docs/design-system/patterns/delete-confirmation.md +40 -40
- package/docs/design-system/patterns/dialog-body-scroll.md +26 -26
- package/docs/design-system/patterns/dialog-structure.md +32 -32
- package/docs/design-system/patterns/dialog-variants.md +41 -41
- package/docs/design-system/patterns/feature-flags.md +24 -20
- package/docs/design-system/patterns/header-metadata.md +57 -57
- package/docs/design-system/patterns/i18n-setup.md +117 -117
- package/docs/design-system/patterns/pagination.md +27 -27
- package/docs/design-system/patterns/single-scroll.md +39 -39
- package/docs/design-system/patterns/vite-tailwind-setup.md +48 -48
- package/docs/design-system/platform.md +18 -18
- package/docs/design-system/selectors.md +240 -236
- package/docs/design-system/tables-grids.md +95 -38
- package/package.json +150 -144
- package/dist/README.md +0 -1079
- package/dist/bin/bootstrap.js +0 -40
- package/dist/bin/pull-docs.js +0 -186
- package/dist/docs/KNOWLEDGE.md +0 -109
|
@@ -11,29 +11,29 @@ Componente de página completa para gerenciar planos de ação. Inclui formulár
|
|
|
11
11
|
|
|
12
12
|
**Uso:**
|
|
13
13
|
```tsx
|
|
14
|
-
import { ActionPlanPage, ETaskPlanStatus } from "forlogic-core"
|
|
15
|
-
|
|
16
|
-
<ActionPlanPage
|
|
17
|
-
actionPlan={actionPlan}
|
|
18
|
-
config={{
|
|
19
|
-
enablePredecessors: true,
|
|
20
|
-
enableCosts: true,
|
|
21
|
-
enableAttachments: true,
|
|
22
|
-
enableComments: true,
|
|
23
|
-
enableHistory: true,
|
|
24
|
-
}}
|
|
25
|
-
users={users}
|
|
26
|
-
places={places}
|
|
27
|
-
progress={progress}
|
|
28
|
-
comments={comments}
|
|
29
|
-
history={history}
|
|
30
|
-
attachments={attachments}
|
|
31
|
-
onSave={handleSave}
|
|
32
|
-
onCancel={() => navigate(-1)}
|
|
33
|
-
onChangeStatus={handleChangeStatus}
|
|
34
|
-
onReportProgress={handleReportProgress}
|
|
35
|
-
onAddComment={handleAddComment}
|
|
36
|
-
onUploadAttachment={handleUploadAttachment}
|
|
14
|
+
import { ActionPlanPage, ETaskPlanStatus } from "forlogic-core"
|
|
15
|
+
|
|
16
|
+
<ActionPlanPage
|
|
17
|
+
actionPlan={actionPlan}
|
|
18
|
+
config={{
|
|
19
|
+
enablePredecessors: true,
|
|
20
|
+
enableCosts: true,
|
|
21
|
+
enableAttachments: true,
|
|
22
|
+
enableComments: true,
|
|
23
|
+
enableHistory: true,
|
|
24
|
+
}}
|
|
25
|
+
users={users}
|
|
26
|
+
places={places}
|
|
27
|
+
progress={progress}
|
|
28
|
+
comments={comments}
|
|
29
|
+
history={history}
|
|
30
|
+
attachments={attachments}
|
|
31
|
+
onSave={handleSave}
|
|
32
|
+
onCancel={() => navigate(-1)}
|
|
33
|
+
onChangeStatus={handleChangeStatus}
|
|
34
|
+
onReportProgress={handleReportProgress}
|
|
35
|
+
onAddComment={handleAddComment}
|
|
36
|
+
onUploadAttachment={handleUploadAttachment}
|
|
37
37
|
/>
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -47,47 +47,47 @@ import { ActionPlanPage, ETaskPlanStatus } from "forlogic-core"
|
|
|
47
47
|
|
|
48
48
|
**Exemplos:**
|
|
49
49
|
```tsx
|
|
50
|
-
<ActionPlanPage
|
|
51
|
-
actionPlan={actionPlan}
|
|
52
|
-
config={{
|
|
53
|
-
enablePredecessors: true,
|
|
54
|
-
enableCosts: true,
|
|
55
|
-
enableAttachments: true,
|
|
56
|
-
enableComments: true,
|
|
57
|
-
enableHistory: true,
|
|
58
|
-
hasComments: true,
|
|
59
|
-
}}
|
|
60
|
-
users={users}
|
|
61
|
-
places={places}
|
|
62
|
-
actionTypes={actionTypes}
|
|
63
|
-
causes={causes}
|
|
64
|
-
progress={progress}
|
|
65
|
-
predecessors={predecessors}
|
|
66
|
-
costs={costs}
|
|
67
|
-
comments={comments}
|
|
68
|
-
history={history}
|
|
69
|
-
attachments={attachments}
|
|
70
|
-
onSave={handleSave}
|
|
71
|
-
onChangeStatus={handleChangeStatus}
|
|
72
|
-
onReportProgress={handleReportProgress}
|
|
73
|
-
onAddComment={handleAddComment}
|
|
74
|
-
onEditComment={handleEditComment}
|
|
75
|
-
onDeleteComment={handleDeleteComment}
|
|
76
|
-
onUploadAttachment={handleUploadAttachment}
|
|
77
|
-
onDeleteAttachment={handleDeleteAttachment}
|
|
78
|
-
onRenameAttachment={handleRenameAttachment}
|
|
79
|
-
onDownloadAttachment={handleDownloadAttachment}
|
|
80
|
-
onViewAttachment={handleViewAttachment}
|
|
50
|
+
<ActionPlanPage
|
|
51
|
+
actionPlan={actionPlan}
|
|
52
|
+
config={{
|
|
53
|
+
enablePredecessors: true,
|
|
54
|
+
enableCosts: true,
|
|
55
|
+
enableAttachments: true,
|
|
56
|
+
enableComments: true,
|
|
57
|
+
enableHistory: true,
|
|
58
|
+
hasComments: true,
|
|
59
|
+
}}
|
|
60
|
+
users={users}
|
|
61
|
+
places={places}
|
|
62
|
+
actionTypes={actionTypes}
|
|
63
|
+
causes={causes}
|
|
64
|
+
progress={progress}
|
|
65
|
+
predecessors={predecessors}
|
|
66
|
+
costs={costs}
|
|
67
|
+
comments={comments}
|
|
68
|
+
history={history}
|
|
69
|
+
attachments={attachments}
|
|
70
|
+
onSave={handleSave}
|
|
71
|
+
onChangeStatus={handleChangeStatus}
|
|
72
|
+
onReportProgress={handleReportProgress}
|
|
73
|
+
onAddComment={handleAddComment}
|
|
74
|
+
onEditComment={handleEditComment}
|
|
75
|
+
onDeleteComment={handleDeleteComment}
|
|
76
|
+
onUploadAttachment={handleUploadAttachment}
|
|
77
|
+
onDeleteAttachment={handleDeleteAttachment}
|
|
78
|
+
onRenameAttachment={handleRenameAttachment}
|
|
79
|
+
onDownloadAttachment={handleDownloadAttachment}
|
|
80
|
+
onViewAttachment={handleViewAttachment}
|
|
81
81
|
/>
|
|
82
82
|
```
|
|
83
83
|
```tsx
|
|
84
|
-
<ActionPlanPage
|
|
85
|
-
isNew
|
|
86
|
-
config={{}}
|
|
87
|
-
users={users}
|
|
88
|
-
places={places}
|
|
89
|
-
onSave={handleSave}
|
|
90
|
-
onCancel={() => navigate(-1)}
|
|
84
|
+
<ActionPlanPage
|
|
85
|
+
isNew
|
|
86
|
+
config={{}}
|
|
87
|
+
users={users}
|
|
88
|
+
places={places}
|
|
89
|
+
onSave={handleSave}
|
|
90
|
+
onCancel={() => navigate(-1)}
|
|
91
91
|
/>
|
|
92
92
|
```
|
|
93
93
|
```tsx
|
|
@@ -103,7 +103,7 @@ import { ActionPlanStatusBadge, ETaskPlanStatus } from
|
|
|
103
103
|
- Anexos suportam upload múltiplo, barra de progresso, renomear inline, context menu (visualizar, download, excluir) e detecção de duplicatas.
|
|
104
104
|
- Slots (attachmentsSlot, commentsSlot, historySlot) permitem substituir os componentes padrão por implementações customizadas do projeto consumidor.
|
|
105
105
|
|
|
106
|
-
> Fonte: `src
|
|
106
|
+
> Fonte: `src/design-system/docs/components/ActionPlanDoc.tsx`
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
@@ -143,7 +143,7 @@ import { AuditTrailPage } from 'forlogic-core';
|
|
|
143
143
|
- Componente de página completa — inclui toolbar, filtros e tabela
|
|
144
144
|
- Requer implementação dos callbacks de busca no backend
|
|
145
145
|
|
|
146
|
-
> Fonte: `src
|
|
146
|
+
> Fonte: `src/design-system/docs/components/AuditTrailDoc.tsx`
|
|
147
147
|
|
|
148
148
|
---
|
|
149
149
|
|
|
@@ -153,27 +153,27 @@ Componente container que renderiza campos de formulário dinâmicos baseados em
|
|
|
153
153
|
|
|
154
154
|
**Uso:**
|
|
155
155
|
```tsx
|
|
156
|
-
import { CustomFormFields, ECustomFormFieldType, validateFields } from "forlogic-core"
|
|
157
|
-
import type { FieldAssociation } from "forlogic-core"
|
|
158
|
-
|
|
159
|
-
const fields: FieldAssociation[] = [
|
|
160
|
-
{
|
|
161
|
-
id: 'f1',
|
|
162
|
-
type: ECustomFormFieldType.text,
|
|
163
|
-
name: 'Nome',
|
|
164
|
-
required: true,
|
|
165
|
-
config: { multiline: false },
|
|
166
|
-
isActive: true,
|
|
167
|
-
},
|
|
168
|
-
// ...mais campos
|
|
169
|
-
];
|
|
170
|
-
|
|
171
|
-
const [formFields, setFormFields] = useState(fields);
|
|
172
|
-
|
|
173
|
-
<CustomFormFields
|
|
174
|
-
fields={formFields}
|
|
175
|
-
onChange={setFormFields}
|
|
176
|
-
onFieldChange={(field) => console.log('Changed:', field)}
|
|
156
|
+
import { CustomFormFields, ECustomFormFieldType, validateFields } from "forlogic-core"
|
|
157
|
+
import type { FieldAssociation } from "forlogic-core"
|
|
158
|
+
|
|
159
|
+
const fields: FieldAssociation[] = [
|
|
160
|
+
{
|
|
161
|
+
id: 'f1',
|
|
162
|
+
type: ECustomFormFieldType.text,
|
|
163
|
+
name: 'Nome',
|
|
164
|
+
required: true,
|
|
165
|
+
config: { multiline: false },
|
|
166
|
+
isActive: true,
|
|
167
|
+
},
|
|
168
|
+
// ...mais campos
|
|
169
|
+
];
|
|
170
|
+
|
|
171
|
+
const [formFields, setFormFields] = useState(fields);
|
|
172
|
+
|
|
173
|
+
<CustomFormFields
|
|
174
|
+
fields={formFields}
|
|
175
|
+
onChange={setFormFields}
|
|
176
|
+
onFieldChange={(field) => console.log('Changed:', field)}
|
|
177
177
|
/>
|
|
178
178
|
```
|
|
179
179
|
|
|
@@ -185,7 +185,7 @@ const [formFields, setFormFields] = useState(fields);
|
|
|
185
185
|
- Use setFormFieldValues() para aplicar valores salvos a uma lista de campos.
|
|
186
186
|
- Campos de seleção suportam dataSource custom (dados estáticos) e users (lista de usuários do sistema).
|
|
187
187
|
|
|
188
|
-
> Fonte: `src
|
|
188
|
+
> Fonte: `src/design-system/docs/components/CustomFormFieldsDoc.tsx`
|
|
189
189
|
|
|
190
190
|
---
|
|
191
191
|
|
|
@@ -195,22 +195,22 @@ Exibe uma lista de opções para o usuário escolher—acionada por um botão.
|
|
|
195
195
|
|
|
196
196
|
**Uso:**
|
|
197
197
|
```tsx
|
|
198
|
-
import {
|
|
199
|
-
Select,
|
|
200
|
-
SelectContent,
|
|
201
|
-
SelectItem,
|
|
202
|
-
SelectTrigger,
|
|
203
|
-
SelectValue,
|
|
204
|
-
} from "forlogic-core"
|
|
205
|
-
|
|
206
|
-
<Select>
|
|
207
|
-
<SelectTrigger className="w-[180px]">
|
|
208
|
-
<SelectValue placeholder="Theme" />
|
|
209
|
-
</SelectTrigger>
|
|
210
|
-
<SelectContent>
|
|
211
|
-
<SelectItem value="light">Light</SelectItem>
|
|
212
|
-
<SelectItem value="dark">Dark</SelectItem>
|
|
213
|
-
</SelectContent>
|
|
198
|
+
import {
|
|
199
|
+
Select,
|
|
200
|
+
SelectContent,
|
|
201
|
+
SelectItem,
|
|
202
|
+
SelectTrigger,
|
|
203
|
+
SelectValue,
|
|
204
|
+
} from "forlogic-core"
|
|
205
|
+
|
|
206
|
+
<Select>
|
|
207
|
+
<SelectTrigger className="w-[180px]">
|
|
208
|
+
<SelectValue placeholder="Theme" />
|
|
209
|
+
</SelectTrigger>
|
|
210
|
+
<SelectContent>
|
|
211
|
+
<SelectItem value="light">Light</SelectItem>
|
|
212
|
+
<SelectItem value="dark">Dark</SelectItem>
|
|
213
|
+
</SelectContent>
|
|
214
214
|
</Select>
|
|
215
215
|
```
|
|
216
216
|
|
|
@@ -236,13 +236,13 @@ import {
|
|
|
236
236
|
- quando o Select estiver dentro de um Dialog para evitar problemas de scroll
|
|
237
237
|
- 💡 Para seleção com busca, considere usar
|
|
238
238
|
- ao invés de
|
|
239
|
-
- ,
|
|
239
|
+
- ,
|
|
240
240
|
|
|
241
241
|
- rounded-lg
|
|
242
242
|
- hover:border-primary
|
|
243
243
|
- transition-colors
|
|
244
244
|
|
|
245
|
-
> Fonte: `src
|
|
245
|
+
> Fonte: `src/design-system/docs/components/SelectDoc.tsx`
|
|
246
246
|
|
|
247
247
|
---
|
|
248
248
|
|
|
@@ -252,40 +252,40 @@ Módulo hierárquico de liderança para gerenciar relações de liderança entre
|
|
|
252
252
|
|
|
253
253
|
**Uso:**
|
|
254
254
|
```tsx
|
|
255
|
-
// Página completa de liderança
|
|
256
|
-
import { LeadershipPage } from 'forlogic-core';
|
|
257
|
-
|
|
258
|
-
function MyLeadershipPage() {
|
|
259
|
-
return <LeadershipPage />;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// Ou use componentes individuais
|
|
263
|
-
import {
|
|
264
|
-
LeadershipDialog,
|
|
265
|
-
useLeadershipApi
|
|
266
|
-
} from 'forlogic-core';
|
|
267
|
-
|
|
268
|
-
function CustomLeadershipView() {
|
|
269
|
-
const { data: leaders, isLoading } = useLeadershipApi();
|
|
270
|
-
const [dialogOpen, setDialogOpen] = useState(false);
|
|
271
|
-
|
|
272
|
-
if (isLoading) return <div>Carregando...</div>;
|
|
273
|
-
|
|
274
|
-
return (
|
|
275
|
-
<div>
|
|
276
|
-
<Button onClick={() => setDialogOpen(true)}>
|
|
277
|
-
Adicionar Líder
|
|
278
|
-
</Button>
|
|
279
|
-
|
|
280
|
-
<LeadershipDialog
|
|
281
|
-
open={dialogOpen}
|
|
282
|
-
onOpenChange={setDialogOpen}
|
|
283
|
-
title="Novo Líder"
|
|
284
|
-
/>
|
|
285
|
-
|
|
286
|
-
{/* Renderizar hierarquia */}
|
|
287
|
-
</div>
|
|
288
|
-
);
|
|
255
|
+
// Página completa de liderança
|
|
256
|
+
import { LeadershipPage } from 'forlogic-core';
|
|
257
|
+
|
|
258
|
+
function MyLeadershipPage() {
|
|
259
|
+
return <LeadershipPage />;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Ou use componentes individuais
|
|
263
|
+
import {
|
|
264
|
+
LeadershipDialog,
|
|
265
|
+
useLeadershipApi
|
|
266
|
+
} from 'forlogic-core';
|
|
267
|
+
|
|
268
|
+
function CustomLeadershipView() {
|
|
269
|
+
const { data: leaders, isLoading } = useLeadershipApi();
|
|
270
|
+
const [dialogOpen, setDialogOpen] = useState(false);
|
|
271
|
+
|
|
272
|
+
if (isLoading) return <div>Carregando...</div>;
|
|
273
|
+
|
|
274
|
+
return (
|
|
275
|
+
<div>
|
|
276
|
+
<Button onClick={() => setDialogOpen(true)}>
|
|
277
|
+
Adicionar Líder
|
|
278
|
+
</Button>
|
|
279
|
+
|
|
280
|
+
<LeadershipDialog
|
|
281
|
+
open={dialogOpen}
|
|
282
|
+
onOpenChange={setDialogOpen}
|
|
283
|
+
title="Novo Líder"
|
|
284
|
+
/>
|
|
285
|
+
|
|
286
|
+
{/* Renderizar hierarquia */}
|
|
287
|
+
</div>
|
|
288
|
+
);
|
|
289
289
|
}
|
|
290
290
|
```
|
|
291
291
|
|
|
@@ -322,7 +322,7 @@ function CustomLeadershipView() {
|
|
|
322
322
|
- O estado de expansão é persistido no localStorage por alias.
|
|
323
323
|
- Soft delete é usado para remoção (is_removed = true).
|
|
324
324
|
|
|
325
|
-
> Fonte: `src
|
|
325
|
+
> Fonte: `src/design-system/docs/components/LeadershipDoc.tsx`
|
|
326
326
|
|
|
327
327
|
---
|
|
328
328
|
|
|
@@ -332,30 +332,30 @@ Módulo completo para upload, edição e renderização de imagens e vídeos. In
|
|
|
332
332
|
|
|
333
333
|
**Uso:**
|
|
334
334
|
```tsx
|
|
335
|
-
// Exemplo básico de upload de imagem
|
|
336
|
-
const { upload, uploading, progress } = useMediaUpload({
|
|
337
|
-
uploadFunction: async (file, options) => {
|
|
338
|
-
// Implementação do upload para seu storage
|
|
339
|
-
const url = await uploadToStorage(file, options);
|
|
340
|
-
return { url, path: file.name };
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
// Renderizar uma imagem
|
|
345
|
-
<ImageRenderer
|
|
346
|
-
content={{
|
|
347
|
-
imageUrl: 'https://example.com/image.jpg',
|
|
348
|
-
caption: 'Legenda da imagem',
|
|
349
|
-
alignment: 'center'
|
|
350
|
-
}}
|
|
351
|
-
/>
|
|
352
|
-
|
|
353
|
-
// Renderizar um vídeo
|
|
354
|
-
<VideoRenderer
|
|
355
|
-
content={{
|
|
356
|
-
videoUrl: 'https://youtube.com/watch?v=...',
|
|
357
|
-
controls: true
|
|
358
|
-
}}
|
|
335
|
+
// Exemplo básico de upload de imagem
|
|
336
|
+
const { upload, uploading, progress } = useMediaUpload({
|
|
337
|
+
uploadFunction: async (file, options) => {
|
|
338
|
+
// Implementação do upload para seu storage
|
|
339
|
+
const url = await uploadToStorage(file, options);
|
|
340
|
+
return { url, path: file.name };
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
// Renderizar uma imagem
|
|
345
|
+
<ImageRenderer
|
|
346
|
+
content={{
|
|
347
|
+
imageUrl: 'https://example.com/image.jpg',
|
|
348
|
+
caption: 'Legenda da imagem',
|
|
349
|
+
alignment: 'center'
|
|
350
|
+
}}
|
|
351
|
+
/>
|
|
352
|
+
|
|
353
|
+
// Renderizar um vídeo
|
|
354
|
+
<VideoRenderer
|
|
355
|
+
content={{
|
|
356
|
+
videoUrl: 'https://youtube.com/watch?v=...',
|
|
357
|
+
controls: true
|
|
358
|
+
}}
|
|
359
359
|
/>
|
|
360
360
|
```
|
|
361
361
|
|
|
@@ -398,7 +398,7 @@ import { useMediaUpload, getSupabaseClient } from
|
|
|
398
398
|
- O módulo não inclui implementação de storage - use Supabase, S3, etc.
|
|
399
399
|
- Helpers de imagem usam Canvas API para compressão e resize
|
|
400
400
|
|
|
401
|
-
> Fonte: `src
|
|
401
|
+
> Fonte: `src/design-system/docs/components/MediaDoc.tsx`
|
|
402
402
|
|
|
403
403
|
---
|
|
404
404
|
|
|
@@ -408,81 +408,81 @@ Módulo para gerenciar estruturas hierárquicas de locais integrado com a API Qu
|
|
|
408
408
|
|
|
409
409
|
**Uso:**
|
|
410
410
|
```tsx
|
|
411
|
-
// =====================
|
|
412
|
-
// BUSCAR LOCAIS
|
|
413
|
-
// =====================
|
|
414
|
-
import { placeService } from 'forlogic-core';
|
|
415
|
-
|
|
416
|
-
async function loadPlaces() {
|
|
417
|
-
const places = await placeService.getPlaces(alias, companyId);
|
|
418
|
-
// places já vem em estrutura hierárquica
|
|
419
|
-
console.log(places);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
// =====================
|
|
423
|
-
// LISTA SIMPLES (SEM GESTÃO DE ACESSOS)
|
|
424
|
-
// =====================
|
|
425
|
-
import { PlacesList } from 'forlogic-core';
|
|
426
|
-
|
|
427
|
-
function MyPlacesPage() {
|
|
428
|
-
const [places, setPlaces] = useState<Place[]>([]);
|
|
429
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
430
|
-
|
|
431
|
-
useEffect(() => {
|
|
432
|
-
placeService.getPlaces(alias, companyId)
|
|
433
|
-
.then(setPlaces)
|
|
434
|
-
.finally(() => setIsLoading(false));
|
|
435
|
-
}, [alias, companyId]);
|
|
436
|
-
|
|
437
|
-
return (
|
|
438
|
-
<PlacesList
|
|
439
|
-
places={places}
|
|
440
|
-
isLoading={isLoading}
|
|
441
|
-
/>
|
|
442
|
-
);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
// =====================
|
|
446
|
-
// COM GESTÃO DE ACESSOS
|
|
447
|
-
// =====================
|
|
448
|
-
import { PlacesList, PlaceCard } from 'forlogic-core';
|
|
449
|
-
|
|
450
|
-
function PlacesWithAccess() {
|
|
451
|
-
const [places, setPlaces] = useState<Place[]>([]);
|
|
452
|
-
const [managers, setManagers] = useState<Record<string, string>>({});
|
|
453
|
-
const [members, setMembers] = useState<Record<string, string[]>>({});
|
|
454
|
-
|
|
455
|
-
const manageAccessConfig = {
|
|
456
|
-
onMakeManager: async (userId, placeId) => {
|
|
457
|
-
setManagers(prev => ({ ...prev, [placeId]: userId }));
|
|
458
|
-
// Chamar API para salvar
|
|
459
|
-
},
|
|
460
|
-
onMakeMembers: async (userIds, placeId) => {
|
|
461
|
-
setMembers(prev => ({ ...prev, [placeId]: userIds }));
|
|
462
|
-
// Chamar API para salvar
|
|
463
|
-
},
|
|
464
|
-
getCurrentManagerId: (placeId) => managers[placeId],
|
|
465
|
-
getCurrentMemberIds: (placeId) => members[placeId] || []
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
return (
|
|
469
|
-
<PlacesList
|
|
470
|
-
places={places}
|
|
471
|
-
isLoading={false}
|
|
472
|
-
manageAccessConfig={manageAccessConfig}
|
|
473
|
-
/>
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
// =====================
|
|
478
|
-
// PLACECARD INDIVIDUAL
|
|
479
|
-
// =====================
|
|
480
|
-
import { PlaceCard } from 'forlogic-core';
|
|
481
|
-
|
|
482
|
-
<PlaceCard
|
|
483
|
-
place={myPlace}
|
|
484
|
-
level={0}
|
|
485
|
-
manageAccessConfig={manageAccessConfig}
|
|
411
|
+
// =====================
|
|
412
|
+
// BUSCAR LOCAIS
|
|
413
|
+
// =====================
|
|
414
|
+
import { placeService } from 'forlogic-core';
|
|
415
|
+
|
|
416
|
+
async function loadPlaces() {
|
|
417
|
+
const places = await placeService.getPlaces(alias, companyId);
|
|
418
|
+
// places já vem em estrutura hierárquica
|
|
419
|
+
console.log(places);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// =====================
|
|
423
|
+
// LISTA SIMPLES (SEM GESTÃO DE ACESSOS)
|
|
424
|
+
// =====================
|
|
425
|
+
import { PlacesList } from 'forlogic-core';
|
|
426
|
+
|
|
427
|
+
function MyPlacesPage() {
|
|
428
|
+
const [places, setPlaces] = useState<Place[]>([]);
|
|
429
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
430
|
+
|
|
431
|
+
useEffect(() => {
|
|
432
|
+
placeService.getPlaces(alias, companyId)
|
|
433
|
+
.then(setPlaces)
|
|
434
|
+
.finally(() => setIsLoading(false));
|
|
435
|
+
}, [alias, companyId]);
|
|
436
|
+
|
|
437
|
+
return (
|
|
438
|
+
<PlacesList
|
|
439
|
+
places={places}
|
|
440
|
+
isLoading={isLoading}
|
|
441
|
+
/>
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// =====================
|
|
446
|
+
// COM GESTÃO DE ACESSOS
|
|
447
|
+
// =====================
|
|
448
|
+
import { PlacesList, PlaceCard } from 'forlogic-core';
|
|
449
|
+
|
|
450
|
+
function PlacesWithAccess() {
|
|
451
|
+
const [places, setPlaces] = useState<Place[]>([]);
|
|
452
|
+
const [managers, setManagers] = useState<Record<string, string>>({});
|
|
453
|
+
const [members, setMembers] = useState<Record<string, string[]>>({});
|
|
454
|
+
|
|
455
|
+
const manageAccessConfig = {
|
|
456
|
+
onMakeManager: async (userId, placeId) => {
|
|
457
|
+
setManagers(prev => ({ ...prev, [placeId]: userId }));
|
|
458
|
+
// Chamar API para salvar
|
|
459
|
+
},
|
|
460
|
+
onMakeMembers: async (userIds, placeId) => {
|
|
461
|
+
setMembers(prev => ({ ...prev, [placeId]: userIds }));
|
|
462
|
+
// Chamar API para salvar
|
|
463
|
+
},
|
|
464
|
+
getCurrentManagerId: (placeId) => managers[placeId],
|
|
465
|
+
getCurrentMemberIds: (placeId) => members[placeId] || []
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
return (
|
|
469
|
+
<PlacesList
|
|
470
|
+
places={places}
|
|
471
|
+
isLoading={false}
|
|
472
|
+
manageAccessConfig={manageAccessConfig}
|
|
473
|
+
/>
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// =====================
|
|
478
|
+
// PLACECARD INDIVIDUAL
|
|
479
|
+
// =====================
|
|
480
|
+
import { PlaceCard } from 'forlogic-core';
|
|
481
|
+
|
|
482
|
+
<PlaceCard
|
|
483
|
+
place={myPlace}
|
|
484
|
+
level={0}
|
|
485
|
+
manageAccessConfig={manageAccessConfig}
|
|
486
486
|
/>
|
|
487
487
|
```
|
|
488
488
|
|
|
@@ -500,7 +500,7 @@ import { PlaceCard } from 'forlogic-core';
|
|
|
500
500
|
- A gestão de acessos é opcional - sem manageAccessConfig, apenas exibe.
|
|
501
501
|
- Níveis de hierarquia são controlados pela prop level no PlaceCard.
|
|
502
502
|
|
|
503
|
-
> Fonte: `src
|
|
503
|
+
> Fonte: `src/design-system/docs/components/PlacesDoc.tsx`
|
|
504
504
|
|
|
505
505
|
---
|
|
506
506
|
|
|
@@ -510,65 +510,65 @@ Campo de seleção de usuários integrado com a API Qualiex. Suporta seleção
|
|
|
510
510
|
|
|
511
511
|
**Uso:**
|
|
512
512
|
```tsx
|
|
513
|
-
import { QualiexUserField } from "forlogic-core"
|
|
514
|
-
|
|
515
|
-
// =====================
|
|
516
|
-
// USO BÁSICO
|
|
517
|
-
// =====================
|
|
518
|
-
<QualiexUserField
|
|
519
|
-
value={userId}
|
|
520
|
-
onChange={setUserId}
|
|
521
|
-
placeholder="Selecione..."
|
|
522
|
-
/>
|
|
523
|
-
|
|
524
|
-
// =====================
|
|
525
|
-
// COM LABEL E REQUIRED
|
|
526
|
-
// =====================
|
|
527
|
-
import { UserCheck } from "lucide-react"
|
|
528
|
-
|
|
529
|
-
<QualiexUserField
|
|
530
|
-
label="Responsável"
|
|
531
|
-
required
|
|
532
|
-
icon={UserCheck}
|
|
533
|
-
value={userId}
|
|
534
|
-
onChange={setUserId}
|
|
535
|
-
/>
|
|
536
|
-
|
|
537
|
-
// =====================
|
|
538
|
-
// SELEÇÃO MÚLTIPLA
|
|
539
|
-
// =====================
|
|
540
|
-
const [userIds, setUserIds] = useState<string[]>([])
|
|
541
|
-
|
|
542
|
-
<QualiexUserField
|
|
543
|
-
multiple
|
|
544
|
-
label="Avaliadores"
|
|
545
|
-
required
|
|
546
|
-
value={userIds}
|
|
547
|
-
onChange={setUserIds}
|
|
548
|
-
maxDisplayedBadges={3}
|
|
549
|
-
/>
|
|
550
|
-
|
|
551
|
-
// =====================
|
|
552
|
-
// DISPLAY CUSTOMIZADO
|
|
553
|
-
// =====================
|
|
554
|
-
|
|
555
|
-
// Exibir nome + email
|
|
556
|
-
<QualiexUserField
|
|
557
|
-
displayFormat="name-email"
|
|
558
|
-
value={userId}
|
|
559
|
-
onChange={setUserId}
|
|
560
|
-
/>
|
|
561
|
-
|
|
562
|
-
// Exibir nome + cargo
|
|
563
|
-
<QualiexUserField
|
|
564
|
-
displayFormat="name-role"
|
|
565
|
-
value={userId}
|
|
566
|
-
onChange={setUserId}
|
|
567
|
-
/>
|
|
568
|
-
|
|
569
|
-
// Custom display function
|
|
570
|
-
<QualiexUserField
|
|
571
|
-
displayFormat="custom"
|
|
513
|
+
import { QualiexUserField } from "forlogic-core"
|
|
514
|
+
|
|
515
|
+
// =====================
|
|
516
|
+
// USO BÁSICO
|
|
517
|
+
// =====================
|
|
518
|
+
<QualiexUserField
|
|
519
|
+
value={userId}
|
|
520
|
+
onChange={setUserId}
|
|
521
|
+
placeholder="Selecione..."
|
|
522
|
+
/>
|
|
523
|
+
|
|
524
|
+
// =====================
|
|
525
|
+
// COM LABEL E REQUIRED
|
|
526
|
+
// =====================
|
|
527
|
+
import { UserCheck } from "lucide-react"
|
|
528
|
+
|
|
529
|
+
<QualiexUserField
|
|
530
|
+
label="Responsável"
|
|
531
|
+
required
|
|
532
|
+
icon={UserCheck}
|
|
533
|
+
value={userId}
|
|
534
|
+
onChange={setUserId}
|
|
535
|
+
/>
|
|
536
|
+
|
|
537
|
+
// =====================
|
|
538
|
+
// SELEÇÃO MÚLTIPLA
|
|
539
|
+
// =====================
|
|
540
|
+
const [userIds, setUserIds] = useState<string[]>([])
|
|
541
|
+
|
|
542
|
+
<QualiexUserField
|
|
543
|
+
multiple
|
|
544
|
+
label="Avaliadores"
|
|
545
|
+
required
|
|
546
|
+
value={userIds}
|
|
547
|
+
onChange={setUserIds}
|
|
548
|
+
maxDisplayedBadges={3}
|
|
549
|
+
/>
|
|
550
|
+
|
|
551
|
+
// =====================
|
|
552
|
+
// DISPLAY CUSTOMIZADO
|
|
553
|
+
// =====================
|
|
554
|
+
|
|
555
|
+
// Exibir nome + email
|
|
556
|
+
<QualiexUserField
|
|
557
|
+
displayFormat="name-email"
|
|
558
|
+
value={userId}
|
|
559
|
+
onChange={setUserId}
|
|
560
|
+
/>
|
|
561
|
+
|
|
562
|
+
// Exibir nome + cargo
|
|
563
|
+
<QualiexUserField
|
|
564
|
+
displayFormat="name-role"
|
|
565
|
+
value={userId}
|
|
566
|
+
onChange={setUserId}
|
|
567
|
+
/>
|
|
568
|
+
|
|
569
|
+
// Custom display function
|
|
570
|
+
<QualiexUserField
|
|
571
|
+
displayFormat="custom"
|
|
572
572
|
customDisplayFn={(user) => \`\${user.userName} - \${user.placeName || 'Sem local'}\
|
|
573
573
|
```
|
|
574
574
|
|
|
@@ -587,7 +587,7 @@ const [userIds, setUserIds] = useState<string[]>([])
|
|
|
587
587
|
- O hook useQualiexUsers é usado internamente para buscar os usuários
|
|
588
588
|
- Integrado automaticamente com BaseForm via type=
|
|
589
589
|
|
|
590
|
-
> Fonte: `src
|
|
590
|
+
> Fonte: `src/design-system/docs/components/QualiexUserFieldDoc.tsx`
|
|
591
591
|
|
|
592
592
|
---
|
|
593
593
|
|
|
@@ -603,22 +603,22 @@ Exibe uma lista de opções para o usuário escolher—acionada por um botão.
|
|
|
603
603
|
|
|
604
604
|
**Uso:**
|
|
605
605
|
```tsx
|
|
606
|
-
import {
|
|
607
|
-
Select,
|
|
608
|
-
SelectContent,
|
|
609
|
-
SelectItem,
|
|
610
|
-
SelectTrigger,
|
|
611
|
-
SelectValue,
|
|
612
|
-
} from "forlogic-core"
|
|
613
|
-
|
|
614
|
-
<Select>
|
|
615
|
-
<SelectTrigger className="w-[180px]">
|
|
616
|
-
<SelectValue placeholder="Theme" />
|
|
617
|
-
</SelectTrigger>
|
|
618
|
-
<SelectContent>
|
|
619
|
-
<SelectItem value="light">Light</SelectItem>
|
|
620
|
-
<SelectItem value="dark">Dark</SelectItem>
|
|
621
|
-
</SelectContent>
|
|
606
|
+
import {
|
|
607
|
+
Select,
|
|
608
|
+
SelectContent,
|
|
609
|
+
SelectItem,
|
|
610
|
+
SelectTrigger,
|
|
611
|
+
SelectValue,
|
|
612
|
+
} from "forlogic-core"
|
|
613
|
+
|
|
614
|
+
<Select>
|
|
615
|
+
<SelectTrigger className="w-[180px]">
|
|
616
|
+
<SelectValue placeholder="Theme" />
|
|
617
|
+
</SelectTrigger>
|
|
618
|
+
<SelectContent>
|
|
619
|
+
<SelectItem value="light">Light</SelectItem>
|
|
620
|
+
<SelectItem value="dark">Dark</SelectItem>
|
|
621
|
+
</SelectContent>
|
|
622
622
|
</Select>
|
|
623
623
|
```
|
|
624
624
|
|
|
@@ -644,13 +644,13 @@ import {
|
|
|
644
644
|
- quando o Select estiver dentro de um Dialog para evitar problemas de scroll
|
|
645
645
|
- 💡 Para seleção com busca, considere usar
|
|
646
646
|
- ao invés de
|
|
647
|
-
- ,
|
|
647
|
+
- ,
|
|
648
648
|
|
|
649
649
|
- rounded-lg
|
|
650
650
|
- hover:border-primary
|
|
651
651
|
- transition-colors
|
|
652
652
|
|
|
653
|
-
> Fonte: `src
|
|
653
|
+
> Fonte: `src/design-system/docs/components/SelectDoc.tsx`
|
|
654
654
|
|
|
655
655
|
---
|
|
656
656
|
|