@oondemand/oon-core-front 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -452,12 +452,21 @@ interface DocumentViewDef {
452
452
  type: "document";
453
453
  id?: string;
454
454
  model: string;
455
+ endpoint?: string;
455
456
  label?: string;
456
457
  path?: string;
457
458
  icon?: ReactNode;
458
459
  section?: string;
459
460
  approval?: boolean;
460
461
  attachments?: boolean;
462
+ /** Experiência de uso: CRUD operacional (legado) ou biblioteca para leitura. */
463
+ display?: "crud" | "library";
464
+ categoryField?: string;
465
+ titleField?: string;
466
+ descriptionField?: string;
467
+ contentField?: string;
468
+ statusField?: string;
469
+ updatedAtField?: string;
461
470
  permissions?: string[];
462
471
  capabilities?: string[];
463
472
  }
@@ -790,12 +799,22 @@ interface CentralUiManifest {
790
799
  }>;
791
800
  documents?: Array<{
792
801
  model: string;
802
+ endpoint?: string;
793
803
  mode?: string;
794
804
  path?: string;
795
805
  label?: string;
796
806
  section?: string;
797
807
  approval?: boolean;
798
808
  attachments?: boolean;
809
+ display?: "crud" | "library";
810
+ categoryField?: string;
811
+ titleField?: string;
812
+ descriptionField?: string;
813
+ contentField?: string;
814
+ statusField?: string;
815
+ updatedAtField?: string;
816
+ permissions?: string[];
817
+ capabilities?: string[];
799
818
  }>;
800
819
  }
801
820
  /** Dados de runtime que o `central.ui.json` não carrega (vêm do .env/código). */
@@ -939,14 +958,16 @@ interface CoreDocumentProps {
939
958
  approval?: boolean;
940
959
  /** liga gestão de anexos (futuro: /:id/files). */
941
960
  attachments?: boolean;
961
+ /** CRUD preserva o comportamento legado; library prioriza descoberta e leitura. */
962
+ display?: "crud" | "library";
963
+ categoryField?: string;
964
+ titleField?: string;
965
+ descriptionField?: string;
966
+ contentField?: string;
967
+ statusField?: string;
968
+ updatedAtField?: string;
942
969
  }
943
- /**
944
- * Tipo documental. Hoje reusa a coleção genérica (list + CRUD). Quando
945
- * `approval` está ligado, expõe o helper `approveDocument` para as ações
946
- * RESTful do back (Seção 5.2) — documentos fiscais e cadastrais viram
947
- * configuração, não páginas escritas à mão.
948
- */
949
- declare function CoreDocument({ model, label, endpoint, columns, form }: CoreDocumentProps): react.JSX.Element;
970
+ declare function CoreDocument({ model, label, endpoint, columns, form, display, categoryField, titleField, descriptionField, contentField, statusField, updatedAtField, }: CoreDocumentProps): react.JSX.Element;
950
971
 
951
972
  interface CorePipelineProps {
952
973
  model: string;
@@ -1192,6 +1213,6 @@ declare function useOonResource<T = Record<string, unknown>>(basePath: string):
1192
1213
  /** Metadata completa do back (cache de 5 min). */
1193
1214
  declare function useCoreMetadata(): _tanstack_react_query.UseQueryResult<NoInfer<CoreMetadata>, Error>;
1194
1215
  /** Descrição de uma model específica — base do modo "dynamic". */
1195
- declare function useModelSchema(name: string): _tanstack_react_query.UseQueryResult<NoInfer<ModelSummary>, Error>;
1216
+ declare function useModelSchema(name: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<NoInfer<ModelSummary>, Error>;
1196
1217
 
1197
1218
  export { Can, type CentralAppManifest, type CentralFormFieldDef, type CentralManifestBundle, type CentralUiManifest, type CentralUiOnlyManifest, type CollectionMode, type CollectionViewDef, CoreActions, CoreAssistant, CoreCards, CoreCollection, CoreCurrency, CoreDashboard, CoreDataGrid, CoreDocument, CoreEmptyState, CoreField, CoreForm, CoreIntegration, CoreLoadingState, type CoreMetadata, CorePage, CorePageHeader, CorePipeline, CoreRelationField, CoreToolbar, CoreUsersAccess, type DashboardViewDef, type DashboardWidgetDef, type DocumentViewDef, DomainExpressionError, type FieldKind, type FieldMeta, type ListParams, type ManifestRuntime, type ModelSummary, type OonActionDef, type OonApiConfig, type OonAppConfig, type OonAppKind, type OonAuthConfig, type OonAuthMode, type OonBlockDef, type OonColumnDef, type OonComponentRegistry, type OonComputedFieldDefinition, type OonCoreFrontConfig, type OonDomainExpression, type OonDomainExpressionOperator, type OonError, type OonFormFieldDef, type OonLayoutConfig, type OonMenuItem, type OonModule, type OonNavigationConfig, type OonNavigationMode, type OonPageDef, type OonPipelineActionDef, type OonPipelineActionGroup, type OonPipelineActionTone, type OonPipelineDefaultActionsConfig, type OonPipelineDefaultActionsDef, type OonPipelineTicketModalConfig, type OonPipelineViewDef, type OonReactiveFormField, type OonRoute, type OonSchemaVersion, type OonSecurityConfig, type OonTenantContextValue, type OonUiManifest, type OonUser, type OonViewDefinition, type PaginatedResult, type Pagination, PermissionGate, type PipelineViewDef, type ReactiveFormulaResult, type TenantStorage, applyReactiveFormulas, buildDomainMutationPayload, can, coerceDomainFormValue, createIntegrationModule, createTenantStorage, defineCollectionView, defineDashboard, defineDocumentView, defineOonModule, definePipelineView, evaluateDomainExpression, manifestToConfig, oonCoreFront, start, startCentralFromManifest, startFromManifest, useCoreMetadata, useModelSchema, useOonApi, useOonAuth, useOonResource, useOonTenant };