@oondemand/oon-core-front 0.3.27 → 0.3.29
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 +48 -4
- package/dist/index.js +291 -62
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -571,6 +571,16 @@ declare const oonCoreFront: {
|
|
|
571
571
|
start: typeof start;
|
|
572
572
|
};
|
|
573
573
|
|
|
574
|
+
interface CentralFormFieldDef extends OonFormFieldDef {
|
|
575
|
+
/** Filtros fixos enviados como query params ao CRUD da model referenciada. */
|
|
576
|
+
referenceFilters?: Record<string, string | number | boolean | null>;
|
|
577
|
+
/** Mapeia query param da referência para outro campo do mesmo formulário. */
|
|
578
|
+
referenceFilterFrom?: Record<string, string>;
|
|
579
|
+
/** Mensagem exibida enquanto algum campo de referenceFilterFrom estiver vazio. */
|
|
580
|
+
referenceDisabledMessage?: string;
|
|
581
|
+
/** Mantém somente opções em que estes campos estejam vazios/nulos. */
|
|
582
|
+
referenceEmptyFields?: string[];
|
|
583
|
+
}
|
|
574
584
|
/**
|
|
575
585
|
* Schema do `central.ui.json` (Seção 9 do escopo). É o que o frontend
|
|
576
586
|
* consumidor gerado pelo `create-central-oon` carrega — declaração pura, sem
|
|
@@ -598,7 +608,7 @@ interface CentralUiManifest {
|
|
|
598
608
|
label?: string;
|
|
599
609
|
section?: string;
|
|
600
610
|
/** Overrides pontuais de campos; os demais continuam vindo da metadata. */
|
|
601
|
-
form?:
|
|
611
|
+
form?: CentralFormFieldDef[];
|
|
602
612
|
list?: OonCollectionListConfig;
|
|
603
613
|
relations?: Record<string, OonRelationDef>;
|
|
604
614
|
detailModal?: OonDetailModalConfig;
|
|
@@ -608,9 +618,20 @@ interface CentralUiManifest {
|
|
|
608
618
|
model?: string;
|
|
609
619
|
mode?: string;
|
|
610
620
|
stageField?: string;
|
|
621
|
+
stages?: Array<{
|
|
622
|
+
id: string;
|
|
623
|
+
label: string;
|
|
624
|
+
}>;
|
|
625
|
+
titleField?: string;
|
|
611
626
|
path?: string;
|
|
612
627
|
label?: string;
|
|
613
628
|
section?: string;
|
|
629
|
+
/** Overrides do formulário usado ao editar um ticket. */
|
|
630
|
+
form?: CentralFormFieldDef[];
|
|
631
|
+
/** Relações consumidas por abas de resumo e grids relacionados. */
|
|
632
|
+
relations?: Record<string, OonRelationDef>;
|
|
633
|
+
/** Abas, grupos e tamanho do modal aberto pelo card da esteira. */
|
|
634
|
+
ticketModal?: OonDetailModalConfig;
|
|
614
635
|
}>;
|
|
615
636
|
documents?: Array<{
|
|
616
637
|
model: string;
|
|
@@ -650,6 +671,23 @@ declare function manifestToConfig(manifest: CentralUiManifest, runtime: Manifest
|
|
|
650
671
|
*/
|
|
651
672
|
declare function startFromManifest(manifest: CentralUiManifest, runtime: ManifestRuntime): void;
|
|
652
673
|
|
|
674
|
+
/** Configuração declarativa do editor de um ticket aberto pela esteira. */
|
|
675
|
+
type OonPipelineTicketModalConfig = OonDetailModalConfig;
|
|
676
|
+
/**
|
|
677
|
+
* Extensão pública da view de esteira com formulário, relações e modal do ticket.
|
|
678
|
+
* Continua estruturalmente compatível com `PipelineViewDef`.
|
|
679
|
+
*/
|
|
680
|
+
type OonPipelineViewDef = PipelineViewDef & {
|
|
681
|
+
/** Campo exibido como título do card e do modal. */
|
|
682
|
+
titleField?: string;
|
|
683
|
+
/** Overrides de formulário mesclados à metadata do model. */
|
|
684
|
+
form?: OonFormFieldDef[];
|
|
685
|
+
/** Relações disponíveis para abas summary/relatedGrid/readonlyGrid. */
|
|
686
|
+
relations?: Record<string, OonRelationDef>;
|
|
687
|
+
/** Modal declarativo usado ao abrir um ticket da esteira. */
|
|
688
|
+
ticketModal?: OonPipelineTicketModalConfig;
|
|
689
|
+
};
|
|
690
|
+
|
|
653
691
|
/**
|
|
654
692
|
* Helpers declarativos (API pública da Seção 4.3). São identidades tipadas que
|
|
655
693
|
* fixam o `type` da view — servem para o autocomplete e para registrar a view
|
|
@@ -657,7 +695,7 @@ declare function startFromManifest(manifest: CentralUiManifest, runtime: Manifes
|
|
|
657
695
|
*/
|
|
658
696
|
declare function defineCollectionView(def: Omit<CollectionViewDef, "type">): CollectionViewDef;
|
|
659
697
|
declare function defineDocumentView(def: Omit<DocumentViewDef, "type">): DocumentViewDef;
|
|
660
|
-
declare function definePipelineView(def: Omit<
|
|
698
|
+
declare function definePipelineView(def: Omit<OonPipelineViewDef, "type">): OonPipelineViewDef;
|
|
661
699
|
declare function defineDashboard(def: Omit<DashboardViewDef, "type">): DashboardViewDef;
|
|
662
700
|
/** Açúcar para declarar um módulo com tipagem. */
|
|
663
701
|
declare function defineOonModule(mod: OonModule): OonModule;
|
|
@@ -707,9 +745,15 @@ interface CorePipelineProps {
|
|
|
707
745
|
label: string;
|
|
708
746
|
}>;
|
|
709
747
|
titleField?: string;
|
|
748
|
+
/** Overrides mesclados aos campos derivados da metadata. */
|
|
749
|
+
form?: OonFormFieldDef[];
|
|
750
|
+
/** Relações utilizadas pelas abas de resumo e grids relacionados. */
|
|
751
|
+
relations?: Record<string, OonRelationDef>;
|
|
752
|
+
/** Configuração declarativa do editor aberto ao clicar no ticket. */
|
|
753
|
+
ticketModal?: OonDetailModalConfig;
|
|
710
754
|
}
|
|
711
755
|
/** Esteira horizontal padrão, com tickets clicáveis e formulário completo em modal. */
|
|
712
|
-
declare function CorePipeline({ model, label, endpoint, stageField, stages, titleField }: CorePipelineProps): react.JSX.Element;
|
|
756
|
+
declare function CorePipeline({ model, label, endpoint, stageField, stages, titleField, form, relations, ticketModal, }: CorePipelineProps): react.JSX.Element;
|
|
713
757
|
|
|
714
758
|
interface CoreIntegrationProps {
|
|
715
759
|
label?: string;
|
|
@@ -892,4 +936,4 @@ declare function useCoreMetadata(): _tanstack_react_query.UseQueryResult<NoInfer
|
|
|
892
936
|
/** Descrição de uma model específica — base do modo "dynamic". */
|
|
893
937
|
declare function useModelSchema(name: string): _tanstack_react_query.UseQueryResult<NoInfer<ModelSummary>, Error>;
|
|
894
938
|
|
|
895
|
-
export { type CentralUiManifest, type CollectionMode, type CollectionViewDef, CoreActions, CoreAssistant, CoreCards, CoreCollection, CoreCurrency, CoreDashboard, CoreDataGrid, CoreDocument, CoreEmptyState, CoreField, CoreForm, CoreIntegration, CoreLoadingState, type CoreMetadata, CorePage, CorePageHeader, CorePipeline, CoreRelationField, CoreToolbar, type DashboardViewDef, type DashboardWidgetDef, type DocumentViewDef, 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 OonCoreFrontConfig, type OonError, type OonFormFieldDef, type OonLayoutConfig, type OonMenuItem, type OonModule, type OonNavigationConfig, type OonNavigationMode, type OonPageDef, type OonRoute, type OonSchemaVersion, type OonSecurityConfig, type OonUiManifest, type OonUser, type OonViewDefinition, type PaginatedResult, type Pagination, PermissionGate, type PipelineViewDef, defineCollectionView, defineDashboard, defineDocumentView, defineOonModule, definePipelineView, manifestToConfig, oonCoreFront, start, startFromManifest, useCoreMetadata, useModelSchema, useOonApi, useOonAuth, useOonResource };
|
|
939
|
+
export { type CentralFormFieldDef, type CentralUiManifest, type CollectionMode, type CollectionViewDef, CoreActions, CoreAssistant, CoreCards, CoreCollection, CoreCurrency, CoreDashboard, CoreDataGrid, CoreDocument, CoreEmptyState, CoreField, CoreForm, CoreIntegration, CoreLoadingState, type CoreMetadata, CorePage, CorePageHeader, CorePipeline, CoreRelationField, CoreToolbar, type DashboardViewDef, type DashboardWidgetDef, type DocumentViewDef, 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 OonCoreFrontConfig, type OonError, type OonFormFieldDef, type OonLayoutConfig, type OonMenuItem, type OonModule, type OonNavigationConfig, type OonNavigationMode, type OonPageDef, type OonPipelineTicketModalConfig, type OonPipelineViewDef, type OonRoute, type OonSchemaVersion, type OonSecurityConfig, type OonUiManifest, type OonUser, type OonViewDefinition, type PaginatedResult, type Pagination, PermissionGate, type PipelineViewDef, defineCollectionView, defineDashboard, defineDocumentView, defineOonModule, definePipelineView, manifestToConfig, oonCoreFront, start, startFromManifest, useCoreMetadata, useModelSchema, useOonApi, useOonAuth, useOonResource };
|