@oondemand/oon-core-front 0.3.30 → 0.3.32
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 +91 -24
- package/dist/index.js +626 -164
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -571,6 +571,81 @@ declare const oonCoreFront: {
|
|
|
571
571
|
start: typeof start;
|
|
572
572
|
};
|
|
573
573
|
|
|
574
|
+
type OonRelatedGridCreateDef = {
|
|
575
|
+
enabled?: boolean;
|
|
576
|
+
label?: string;
|
|
577
|
+
fields?: OonFormFieldDef[];
|
|
578
|
+
initialValues?: Record<string, unknown>;
|
|
579
|
+
};
|
|
580
|
+
type OonRelatedGridDeleteDef = {
|
|
581
|
+
enabled?: boolean;
|
|
582
|
+
confirm?: string;
|
|
583
|
+
};
|
|
584
|
+
type BaseRelatedGridTab = Extract<OonDetailTabDef, {
|
|
585
|
+
type: "relatedGrid";
|
|
586
|
+
}>;
|
|
587
|
+
/** Aba relacionada com inclusão e exclusão opcionais. */
|
|
588
|
+
type OonOperationalDetailTabDef = Exclude<OonDetailTabDef, BaseRelatedGridTab> | (BaseRelatedGridTab & {
|
|
589
|
+
create?: OonRelatedGridCreateDef;
|
|
590
|
+
delete?: OonRelatedGridDeleteDef;
|
|
591
|
+
});
|
|
592
|
+
/** Modal declarativo que amplia relatedGrid sem quebrar o contrato anterior. */
|
|
593
|
+
type OonOperationalDetailModalConfig = Omit<OonDetailModalConfig, "tabs"> & {
|
|
594
|
+
tabs: OonOperationalDetailTabDef[];
|
|
595
|
+
};
|
|
596
|
+
/** Configuração declarativa do editor de um ticket aberto pela esteira. */
|
|
597
|
+
type OonPipelineTicketModalConfig = OonOperationalDetailModalConfig;
|
|
598
|
+
type OonPipelineViewMode = "board" | "list";
|
|
599
|
+
type OonPipelineCreateDef = {
|
|
600
|
+
enabled?: boolean;
|
|
601
|
+
label?: string;
|
|
602
|
+
initialTab?: string;
|
|
603
|
+
defaultStage?: string;
|
|
604
|
+
defaultValues?: Record<string, unknown>;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* Ações operacionais exibidas no cabeçalho do ticket.
|
|
608
|
+
*
|
|
609
|
+
* - setField/transition atualizam um campo do próprio ticket;
|
|
610
|
+
* - formAction carrega dados opcionais e envia um formulário a um endpoint.
|
|
611
|
+
*/
|
|
612
|
+
type OonPipelineActionDef = Omit<OonRowActionDef, "type"> & {
|
|
613
|
+
type: OonRowActionDef["type"] | "setField" | "transition" | "formAction";
|
|
614
|
+
field?: string;
|
|
615
|
+
value?: unknown;
|
|
616
|
+
title?: string;
|
|
617
|
+
submitLabel?: string;
|
|
618
|
+
loadEndpoint?: string;
|
|
619
|
+
fields?: OonFormFieldDef[];
|
|
620
|
+
initialValues?: Record<string, unknown>;
|
|
621
|
+
};
|
|
622
|
+
/**
|
|
623
|
+
* Extensão pública da view de esteira com filtros, inclusão, lista, ações e
|
|
624
|
+
* modal declarativo. Continua estruturalmente compatível com PipelineViewDef.
|
|
625
|
+
*/
|
|
626
|
+
type OonPipelineViewDef = PipelineViewDef & {
|
|
627
|
+
/** Campo exibido como título do card e do modal. */
|
|
628
|
+
titleField?: string;
|
|
629
|
+
/** Overrides de formulário mesclados à metadata do model. */
|
|
630
|
+
form?: OonFormFieldDef[];
|
|
631
|
+
/** Relações disponíveis para abas summary/relatedGrid/readonlyGrid. */
|
|
632
|
+
relations?: Record<string, OonRelationDef>;
|
|
633
|
+
/** Modal declarativo usado ao abrir um ticket da esteira. */
|
|
634
|
+
ticketModal?: OonPipelineTicketModalConfig;
|
|
635
|
+
/** Filtros aplicados tanto ao quadro quanto à visualização em lista. */
|
|
636
|
+
filters?: OonListFilterDef[];
|
|
637
|
+
/** Configuração do botão de inclusão pela própria esteira. */
|
|
638
|
+
create?: OonPipelineCreateDef;
|
|
639
|
+
/** Modos de visualização liberados para o usuário. */
|
|
640
|
+
viewModes?: OonPipelineViewMode[];
|
|
641
|
+
/** Visualização inicial. */
|
|
642
|
+
defaultView?: OonPipelineViewMode;
|
|
643
|
+
/** Colunas e ações da visualização em lista. */
|
|
644
|
+
list?: OonCollectionListConfig;
|
|
645
|
+
/** Ações exibidas no cabeçalho do ticket aberto. */
|
|
646
|
+
ticketActions?: OonPipelineActionDef[];
|
|
647
|
+
};
|
|
648
|
+
|
|
574
649
|
interface CentralFormFieldDef extends OonFormFieldDef {
|
|
575
650
|
/** Filtros fixos enviados como query params ao CRUD da model referenciada. */
|
|
576
651
|
referenceFilters?: Record<string, string | number | boolean | null>;
|
|
@@ -611,7 +686,7 @@ interface CentralUiManifest {
|
|
|
611
686
|
form?: CentralFormFieldDef[];
|
|
612
687
|
list?: OonCollectionListConfig;
|
|
613
688
|
relations?: Record<string, OonRelationDef>;
|
|
614
|
-
detailModal?:
|
|
689
|
+
detailModal?: OonOperationalDetailModalConfig;
|
|
615
690
|
}>;
|
|
616
691
|
pipelines?: Array<{
|
|
617
692
|
name?: string;
|
|
@@ -631,7 +706,13 @@ interface CentralUiManifest {
|
|
|
631
706
|
/** Relações consumidas por abas de resumo e grids relacionados. */
|
|
632
707
|
relations?: Record<string, OonRelationDef>;
|
|
633
708
|
/** Abas, grupos e tamanho do modal aberto pelo card da esteira. */
|
|
634
|
-
ticketModal?:
|
|
709
|
+
ticketModal?: OonOperationalDetailModalConfig;
|
|
710
|
+
filters?: OonListFilterDef[];
|
|
711
|
+
create?: OonPipelineCreateDef;
|
|
712
|
+
viewModes?: OonPipelineViewMode[];
|
|
713
|
+
defaultView?: OonPipelineViewMode;
|
|
714
|
+
list?: OonCollectionListConfig;
|
|
715
|
+
ticketActions?: OonPipelineActionDef[];
|
|
635
716
|
}>;
|
|
636
717
|
documents?: Array<{
|
|
637
718
|
model: string;
|
|
@@ -671,23 +752,6 @@ declare function manifestToConfig(manifest: CentralUiManifest, runtime: Manifest
|
|
|
671
752
|
*/
|
|
672
753
|
declare function startFromManifest(manifest: CentralUiManifest, runtime: ManifestRuntime): void;
|
|
673
754
|
|
|
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
|
-
|
|
691
755
|
/**
|
|
692
756
|
* Helpers declarativos (API pública da Seção 4.3). São identidades tipadas que
|
|
693
757
|
* fixam o `type` da view — servem para o autocomplete e para registrar a view
|
|
@@ -745,15 +809,18 @@ interface CorePipelineProps {
|
|
|
745
809
|
label: string;
|
|
746
810
|
}>;
|
|
747
811
|
titleField?: string;
|
|
748
|
-
/** Overrides mesclados aos campos derivados da metadata. */
|
|
749
812
|
form?: OonFormFieldDef[];
|
|
750
|
-
/** Relações utilizadas pelas abas de resumo e grids relacionados. */
|
|
751
813
|
relations?: Record<string, OonRelationDef>;
|
|
752
|
-
/** Configuração declarativa do editor aberto ao clicar no ticket. */
|
|
753
814
|
ticketModal?: OonDetailModalConfig;
|
|
815
|
+
filters?: OonListFilterDef[];
|
|
816
|
+
create?: OonPipelineCreateDef;
|
|
817
|
+
viewModes?: OonPipelineViewMode[];
|
|
818
|
+
defaultView?: OonPipelineViewMode;
|
|
819
|
+
list?: OonCollectionListConfig;
|
|
820
|
+
ticketActions?: OonPipelineActionDef[];
|
|
754
821
|
}
|
|
755
|
-
/** Esteira
|
|
756
|
-
declare function CorePipeline({ model, label, endpoint, stageField, stages, titleField, form, relations, ticketModal, }: CorePipelineProps): react.JSX.Element;
|
|
822
|
+
/** Esteira com quadro/lista, filtros, inclusão e ações operacionais no ticket. */
|
|
823
|
+
declare function CorePipeline({ model, label, endpoint, stageField, stages, titleField, form, relations, ticketModal, filters, create, viewModes, defaultView, list, ticketActions, }: CorePipelineProps): react.JSX.Element;
|
|
757
824
|
|
|
758
825
|
interface CoreIntegrationProps {
|
|
759
826
|
label?: string;
|