@oondemand/oon-core-front 0.3.42 → 0.3.43
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 +50 -1
- package/dist/index.js +375 -122
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -776,6 +776,55 @@ declare function manifestToConfig(manifest: CentralUiManifest, runtime: Manifest
|
|
|
776
776
|
*/
|
|
777
777
|
declare function startFromManifest(manifest: CentralUiManifest, runtime: ManifestRuntime): void;
|
|
778
778
|
|
|
779
|
+
type OonDomainExpressionOperator = "add" | "subtract" | "multiply" | "divide" | "min" | "max" | "abs" | "negate" | "coalesce" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "and" | "or" | "not" | "present" | "in";
|
|
780
|
+
type OonDomainExpression = {
|
|
781
|
+
value: unknown;
|
|
782
|
+
} | {
|
|
783
|
+
field: string;
|
|
784
|
+
} | {
|
|
785
|
+
op: OonDomainExpressionOperator;
|
|
786
|
+
args: OonDomainExpression[];
|
|
787
|
+
};
|
|
788
|
+
interface OonComputedFieldDefinition {
|
|
789
|
+
expression: OonDomainExpression;
|
|
790
|
+
precision?: number;
|
|
791
|
+
nullAsZero?: boolean;
|
|
792
|
+
}
|
|
793
|
+
interface OonReactiveFormField {
|
|
794
|
+
field: string;
|
|
795
|
+
kind?: string;
|
|
796
|
+
readonly?: boolean;
|
|
797
|
+
computed?: OonComputedFieldDefinition;
|
|
798
|
+
}
|
|
799
|
+
interface ReactiveFormulaResult {
|
|
800
|
+
values: Record<string, string>;
|
|
801
|
+
errors: Record<string, string>;
|
|
802
|
+
}
|
|
803
|
+
declare class DomainExpressionError extends Error {
|
|
804
|
+
readonly code: string;
|
|
805
|
+
readonly field?: string;
|
|
806
|
+
constructor(message: string, options?: {
|
|
807
|
+
code?: string;
|
|
808
|
+
field?: string;
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
/**
|
|
812
|
+
* Avalia exatamente a mesma AST fechada aceita pelo backend. Esta função é
|
|
813
|
+
* somente uma prévia de UX; o backend recalcula e valida toda mutação.
|
|
814
|
+
*/
|
|
815
|
+
declare function evaluateDomainExpression(expression: OonDomainExpression, record?: Record<string, unknown>, context?: {
|
|
816
|
+
field?: string;
|
|
817
|
+
nullAsZero?: boolean;
|
|
818
|
+
}): unknown;
|
|
819
|
+
declare function coerceDomainFormValue(value: string, kind?: string): unknown;
|
|
820
|
+
/** Recalcula a cadeia de campos computed para exibição imediata no formulário. */
|
|
821
|
+
declare function applyReactiveFormulas(fields: OonReactiveFormField[], currentValues: Record<string, string>): ReactiveFormulaResult;
|
|
822
|
+
/**
|
|
823
|
+
* Remove campos controlados pelo servidor. O backend recebe somente entradas do
|
|
824
|
+
* usuário e recalcula novamente os valores computed antes de persistir.
|
|
825
|
+
*/
|
|
826
|
+
declare function buildDomainMutationPayload(fields: OonReactiveFormField[], values: Record<string, string>): Record<string, unknown>;
|
|
827
|
+
|
|
779
828
|
/**
|
|
780
829
|
* Helpers declarativos (API pública da Seção 4.3). São identidades tipadas que
|
|
781
830
|
* fixam o `type` da view — servem para o autocomplete e para registrar a view
|
|
@@ -1028,4 +1077,4 @@ declare function useCoreMetadata(): _tanstack_react_query.UseQueryResult<NoInfer
|
|
|
1028
1077
|
/** Descrição de uma model específica — base do modo "dynamic". */
|
|
1029
1078
|
declare function useModelSchema(name: string): _tanstack_react_query.UseQueryResult<NoInfer<ModelSummary>, Error>;
|
|
1030
1079
|
|
|
1031
|
-
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 OonPipelineActionDef, type OonPipelineActionGroup, type OonPipelineActionTone, type OonPipelineDefaultActionsConfig, type OonPipelineDefaultActionsDef, 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 };
|
|
1080
|
+
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, 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 OonUiManifest, type OonUser, type OonViewDefinition, type PaginatedResult, type Pagination, PermissionGate, type PipelineViewDef, type ReactiveFormulaResult, applyReactiveFormulas, buildDomainMutationPayload, coerceDomainFormValue, defineCollectionView, defineDashboard, defineDocumentView, defineOonModule, definePipelineView, evaluateDomainExpression, manifestToConfig, oonCoreFront, start, startFromManifest, useCoreMetadata, useModelSchema, useOonApi, useOonAuth, useOonResource };
|