@oondemand/oon-core-front 0.3.44 → 0.3.45
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 +29 -1
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -776,6 +776,34 @@ declare function manifestToConfig(manifest: CentralUiManifest, runtime: Manifest
|
|
|
776
776
|
*/
|
|
777
777
|
declare function startFromManifest(manifest: CentralUiManifest, runtime: ManifestRuntime): void;
|
|
778
778
|
|
|
779
|
+
interface CentralAppManifest {
|
|
780
|
+
$schema?: string;
|
|
781
|
+
schemaVersion: 1;
|
|
782
|
+
id: string;
|
|
783
|
+
name: string;
|
|
784
|
+
slug: string;
|
|
785
|
+
appKind: OonAppKind;
|
|
786
|
+
modules: Record<string, boolean>;
|
|
787
|
+
capabilities: string[];
|
|
788
|
+
compatibility: {
|
|
789
|
+
core: {
|
|
790
|
+
minVersion: string;
|
|
791
|
+
maxVersionExclusive?: string;
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
activation?: {
|
|
795
|
+
enabled?: boolean;
|
|
796
|
+
configurationVersion?: number;
|
|
797
|
+
fields?: unknown[];
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
type CentralUiOnlyManifest = Omit<CentralUiManifest, "name" | "slug" | "appKind" | "auth"> & Partial<Pick<CentralUiManifest, "name" | "slug" | "appKind" | "auth">>;
|
|
801
|
+
interface CentralManifestBundle {
|
|
802
|
+
app: CentralAppManifest;
|
|
803
|
+
ui: CentralUiOnlyManifest;
|
|
804
|
+
}
|
|
805
|
+
declare function startCentralFromManifest(manifest: CentralManifestBundle, runtime: ManifestRuntime): OonCoreFrontConfig;
|
|
806
|
+
|
|
779
807
|
type OonDomainExpressionOperator = "add" | "subtract" | "multiply" | "divide" | "min" | "max" | "abs" | "negate" | "coalesce" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "and" | "or" | "not" | "present" | "in";
|
|
780
808
|
type OonDomainExpression = {
|
|
781
809
|
value: unknown;
|
|
@@ -1077,4 +1105,4 @@ declare function useCoreMetadata(): _tanstack_react_query.UseQueryResult<NoInfer
|
|
|
1077
1105
|
/** Descrição de uma model específica — base do modo "dynamic". */
|
|
1078
1106
|
declare function useModelSchema(name: string): _tanstack_react_query.UseQueryResult<NoInfer<ModelSummary>, Error>;
|
|
1079
1107
|
|
|
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 };
|
|
1108
|
+
export { 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, 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, startCentralFromManifest, startFromManifest, useCoreMetadata, useModelSchema, useOonApi, useOonAuth, useOonResource };
|
package/dist/index.js
CHANGED
|
@@ -5447,6 +5447,31 @@ function startFromManifest(manifest, runtime) {
|
|
|
5447
5447
|
start(manifestToConfig(manifest, runtime));
|
|
5448
5448
|
}
|
|
5449
5449
|
|
|
5450
|
+
// src/appManifest.ts
|
|
5451
|
+
function startCentralFromManifest(manifest, runtime) {
|
|
5452
|
+
const legacyCompatibleUi = {
|
|
5453
|
+
...manifest.ui,
|
|
5454
|
+
name: manifest.app.name,
|
|
5455
|
+
slug: manifest.app.slug,
|
|
5456
|
+
appKind: manifest.app.appKind
|
|
5457
|
+
};
|
|
5458
|
+
const config = manifestToConfig(legacyCompatibleUi, runtime);
|
|
5459
|
+
config.app = {
|
|
5460
|
+
...config.app,
|
|
5461
|
+
id: manifest.app.id,
|
|
5462
|
+
name: manifest.app.name,
|
|
5463
|
+
title: manifest.app.name,
|
|
5464
|
+
kind: manifest.app.appKind
|
|
5465
|
+
};
|
|
5466
|
+
const app = config.app;
|
|
5467
|
+
app.schemaVersion = manifest.app.schemaVersion;
|
|
5468
|
+
app.modules = manifest.app.modules;
|
|
5469
|
+
app.capabilities = manifest.app.capabilities;
|
|
5470
|
+
app.compatibility = manifest.app.compatibility;
|
|
5471
|
+
start(config);
|
|
5472
|
+
return config;
|
|
5473
|
+
}
|
|
5474
|
+
|
|
5450
5475
|
// src/define/views.ts
|
|
5451
5476
|
function defineCollectionView(def) {
|
|
5452
5477
|
return { type: "collection", ...def };
|
|
@@ -5623,6 +5648,7 @@ export {
|
|
|
5623
5648
|
manifestToConfig,
|
|
5624
5649
|
oonCoreFront,
|
|
5625
5650
|
start,
|
|
5651
|
+
startCentralFromManifest,
|
|
5626
5652
|
startFromManifest,
|
|
5627
5653
|
useCoreMetadata,
|
|
5628
5654
|
useModelSchema,
|