@oondemand/oon-core-front 0.4.7 → 0.4.10

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
@@ -135,6 +135,8 @@ interface OonApiConfig {
135
135
  baseUrl: string;
136
136
  assistantBaseUrl?: string;
137
137
  meusAppsUrl?: string;
138
+ /** Control Plane público usado somente por cadastro e confirmação. */
139
+ onboardingBaseUrl?: string;
138
140
  /** Prefixo de versão concatenado às chamadas. Default: "". */
139
141
  versionPrefix?: string;
140
142
  timeout?: number;
@@ -452,12 +454,21 @@ interface DocumentViewDef {
452
454
  type: "document";
453
455
  id?: string;
454
456
  model: string;
457
+ endpoint?: string;
455
458
  label?: string;
456
459
  path?: string;
457
460
  icon?: ReactNode;
458
461
  section?: string;
459
462
  approval?: boolean;
460
463
  attachments?: boolean;
464
+ /** Experiência de uso: CRUD operacional (legado) ou biblioteca para leitura. */
465
+ display?: "crud" | "library";
466
+ categoryField?: string;
467
+ titleField?: string;
468
+ descriptionField?: string;
469
+ contentField?: string;
470
+ statusField?: string;
471
+ updatedAtField?: string;
461
472
  permissions?: string[];
462
473
  capabilities?: string[];
463
474
  }
@@ -790,18 +801,29 @@ interface CentralUiManifest {
790
801
  }>;
791
802
  documents?: Array<{
792
803
  model: string;
804
+ endpoint?: string;
793
805
  mode?: string;
794
806
  path?: string;
795
807
  label?: string;
796
808
  section?: string;
797
809
  approval?: boolean;
798
810
  attachments?: boolean;
811
+ display?: "crud" | "library";
812
+ categoryField?: string;
813
+ titleField?: string;
814
+ descriptionField?: string;
815
+ contentField?: string;
816
+ statusField?: string;
817
+ updatedAtField?: string;
818
+ permissions?: string[];
819
+ capabilities?: string[];
799
820
  }>;
800
821
  }
801
822
  /** Dados de runtime que o `central.ui.json` não carrega (vêm do .env/código). */
802
823
  interface ManifestRuntime {
803
824
  apiBaseUrl: string;
804
825
  meusAppsUrl?: string;
826
+ onboardingBaseUrl?: string;
805
827
  assistantBaseUrl?: string;
806
828
  versionPrefix?: string;
807
829
  /** Token local enviado ao backend somente quando o consumidor o configurar. */
@@ -939,14 +961,16 @@ interface CoreDocumentProps {
939
961
  approval?: boolean;
940
962
  /** liga gestão de anexos (futuro: /:id/files). */
941
963
  attachments?: boolean;
964
+ /** CRUD preserva o comportamento legado; library prioriza descoberta e leitura. */
965
+ display?: "crud" | "library";
966
+ categoryField?: string;
967
+ titleField?: string;
968
+ descriptionField?: string;
969
+ contentField?: string;
970
+ statusField?: string;
971
+ updatedAtField?: string;
942
972
  }
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;
973
+ declare function CoreDocument({ model, label, endpoint, columns, form, display, categoryField, titleField, descriptionField, contentField, statusField, updatedAtField, }: CoreDocumentProps): react.JSX.Element;
950
974
 
951
975
  interface CorePipelineProps {
952
976
  model: string;
@@ -1192,6 +1216,6 @@ declare function useOonResource<T = Record<string, unknown>>(basePath: string):
1192
1216
  /** Metadata completa do back (cache de 5 min). */
1193
1217
  declare function useCoreMetadata(): _tanstack_react_query.UseQueryResult<NoInfer<CoreMetadata>, Error>;
1194
1218
  /** Descrição de uma model específica — base do modo "dynamic". */
1195
- declare function useModelSchema(name: string): _tanstack_react_query.UseQueryResult<NoInfer<ModelSummary>, Error>;
1219
+ declare function useModelSchema(name: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<NoInfer<ModelSummary>, Error>;
1196
1220
 
1197
1221
  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 };