@declarion/react 0.1.1 → 0.1.2
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-lib/api/auth.d.ts +1 -1
- package/dist-lib/api/data.d.ts +2 -2
- package/dist-lib/api/entities.d.ts +1 -1
- package/dist-lib/api/params.d.ts +1 -1
- package/dist-lib/api/properties.d.ts +1 -1
- package/dist-lib/api/schema.d.ts +1 -1
- package/dist-lib/api/status.d.ts +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +1 -1
- package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +2 -2
- package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +3 -3
- package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +3 -3
- package/dist-lib/components/detail-layout/LayoutColumn.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +3 -3
- package/dist-lib/components/detail-layout/LayoutRow.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutTabs.d.ts +1 -1
- package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/QuickAddForm.d.ts +2 -2
- package/dist-lib/components/detail-layout/SectionBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/StatusesBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/TimelineComposer.d.ts +2 -2
- package/dist-lib/components/detail-layout/useQuickAdd.d.ts +2 -2
- package/dist-lib/components/fields/index.d.ts +1 -1
- package/dist-lib/components/filters/FilterChips.d.ts +1 -1
- package/dist-lib/components/filters/FilterDrawer.d.ts +1 -1
- package/dist-lib/components/shared/ActionButton.d.ts +1 -1
- package/dist-lib/components/shared/ActionDialog.d.ts +1 -1
- package/dist-lib/components/shared/AssociationTabs.d.ts +1 -1
- package/dist-lib/components/shared/RowActionItem.d.ts +1 -1
- package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +2 -2
- package/dist-lib/hooks/useAssociatedData.d.ts +1 -1
- package/dist-lib/hooks/useChildrenData.d.ts +1 -1
- package/dist-lib/hooks/useEntity.d.ts +1 -1
- package/dist-lib/hooks/useEntityData.d.ts +2 -2
- package/dist-lib/hooks/useEntityItem.d.ts +1 -1
- package/dist-lib/hooks/useFilters.d.ts +1 -1
- package/dist-lib/hooks/useMutations.d.ts +3 -3
- package/dist-lib/hooks/useScreen.d.ts +1 -1
- package/dist-lib/hooks/useViews.d.ts +1 -1
- package/dist-lib/lib/actions.d.ts +1 -1
- package/dist-lib/lib/child-config.d.ts +1 -1
- package/dist-lib/lib/children-validation.d.ts +2 -2
- package/dist-lib/lib/size-value.d.ts +1 -1
- package/dist-lib/lib/theme-utils.d.ts +1 -1
- package/dist-lib/stores/auth.d.ts +1 -1
- package/package.json +3 -2
package/dist-lib/api/auth.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CheckSetupResponse, LoginResponse, AuthUser, Tenant, SSOProvider } from "
|
|
1
|
+
import type { CheckSetupResponse, LoginResponse, AuthUser, Tenant, SSOProvider } from "../types/api";
|
|
2
2
|
export declare function checkSetup(): Promise<CheckSetupResponse>;
|
|
3
3
|
export declare function login(email: string, password: string): Promise<LoginResponse>;
|
|
4
4
|
export declare function signup(email: string, password: string, displayName: string): Promise<LoginResponse>;
|
package/dist-lib/api/data.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ListParams, ListResponse, DataResponse } from "
|
|
2
|
-
import type { PkValues } from "
|
|
1
|
+
import type { ListParams, ListResponse, DataResponse } from "../types/api";
|
|
2
|
+
import type { PkValues } from "../types/schema";
|
|
3
3
|
export declare function listEntities(entity: string, params?: ListParams): Promise<ListResponse>;
|
|
4
4
|
export declare function getEntity(entity: string, pkValues: PkValues | string): Promise<DataResponse>;
|
|
5
5
|
export declare function createEntity(entity: string, data: Record<string, unknown>): Promise<DataResponse>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Refs, V2ListParams, V2Meta, V2StatusInstance, V2PropertyInstance, EnrichedRow } from "
|
|
1
|
+
import type { Refs, V2ListParams, V2Meta, V2StatusInstance, V2PropertyInstance, EnrichedRow } from "../types/api";
|
|
2
2
|
/** Helper methods injected onto enriched rows. */
|
|
3
3
|
export interface RowHelpers {
|
|
4
4
|
$status(groupCode: string): V2StatusInstance | undefined;
|
package/dist-lib/api/params.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { PublicParam, ResolvedParam } from "
|
|
1
|
+
import type { PublicParam, ResolvedParam } from "../types/api";
|
|
2
2
|
export declare function fetchPublicParams(): Promise<PublicParam[]>;
|
|
3
3
|
export declare function fetchParam(code: string): Promise<ResolvedParam>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { PropertyValue } from "
|
|
1
|
+
import type { PropertyValue } from "../types/api";
|
|
2
2
|
export declare function setObjectProperty(entity: string, id: string, propertyCode: string, value: unknown): Promise<PropertyValue>;
|
|
3
3
|
export declare function deleteObjectProperty(entity: string, id: string, propertyCode: string): Promise<void>;
|
package/dist-lib/api/schema.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Schema } from "
|
|
1
|
+
import type { Schema } from "../types/schema";
|
|
2
2
|
export declare function fetchSchema(): Promise<Schema>;
|
package/dist-lib/api/status.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { StatusInfo } from "
|
|
1
|
+
import type { StatusInfo } from "../types/api";
|
|
2
2
|
export declare function setObjectStatus(entity: string, id: string, groupCode: string, statusCode: string, note?: string): Promise<StatusInfo>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LayoutNode, Schema } from "
|
|
2
|
-
import { type ResolvedChildConfig } from "
|
|
1
|
+
import type { LayoutNode, Schema } from "../../types/schema";
|
|
2
|
+
import { type ResolvedChildConfig } from "../../lib/child-config";
|
|
3
3
|
import type { LayoutContext } from "./LayoutRenderer";
|
|
4
4
|
interface ChildrenBlockProps {
|
|
5
5
|
node: LayoutNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Entity, Schema } from "
|
|
2
|
-
import type { RefsMap } from "
|
|
1
|
+
import type { Entity, Schema } from "../../types/schema";
|
|
2
|
+
import type { RefsMap } from "../../components/fields";
|
|
3
3
|
import type { PendingChildRow } from "./LayoutRenderer";
|
|
4
|
-
import type { ResolvedChildConfig } from "
|
|
4
|
+
import type { ResolvedChildConfig } from "../../lib/child-config";
|
|
5
5
|
interface DraggableChildrenTableProps {
|
|
6
6
|
config: ResolvedChildConfig;
|
|
7
7
|
childEntity: Entity;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Entity, Schema } from "
|
|
2
|
-
import type { RefsMap } from "
|
|
1
|
+
import type { Entity, Schema } from "../../types/schema";
|
|
2
|
+
import type { RefsMap } from "../../components/fields";
|
|
3
3
|
import type { PendingChildRow } from "./LayoutRenderer";
|
|
4
|
-
import type { ResolvedChildConfig } from "
|
|
4
|
+
import type { ResolvedChildConfig } from "../../lib/child-config";
|
|
5
5
|
interface EditableChildrenTableProps {
|
|
6
6
|
config: ResolvedChildConfig;
|
|
7
7
|
childEntity: Entity;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Entity, LayoutNode, Schema } from "
|
|
2
|
-
import type { StatusInfo, PropertyValue } from "
|
|
3
|
-
import type { RefsMap } from "
|
|
1
|
+
import type { Entity, LayoutNode, Schema } from "../../types/schema";
|
|
2
|
+
import type { StatusInfo, PropertyValue } from "../../types/api";
|
|
3
|
+
import type { RefsMap } from "../../components/fields";
|
|
4
4
|
export interface PendingChildRow {
|
|
5
5
|
_key: string;
|
|
6
6
|
_deleted?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ResolvedChildConfig } from "
|
|
2
|
-
import type { Schema } from "
|
|
1
|
+
import type { ResolvedChildConfig } from "../../lib/child-config";
|
|
2
|
+
import type { Schema } from "../../types/schema";
|
|
3
3
|
interface QuickAddFormProps {
|
|
4
4
|
config: ResolvedChildConfig;
|
|
5
5
|
parentEntity: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ResolvedChildConfig } from "
|
|
2
|
-
import type { Schema } from "
|
|
1
|
+
import type { ResolvedChildConfig } from "../../lib/child-config";
|
|
2
|
+
import type { Schema } from "../../types/schema";
|
|
3
3
|
interface TimelineComposerProps {
|
|
4
4
|
config: ResolvedChildConfig;
|
|
5
5
|
parentEntity: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FormEvent } from "react";
|
|
2
|
-
import type { ResolvedChildConfig } from "
|
|
3
|
-
import type { Schema } from "
|
|
2
|
+
import type { ResolvedChildConfig } from "../../lib/child-config";
|
|
3
|
+
import type { Schema } from "../../types/schema";
|
|
4
4
|
export interface UseQuickAddResult {
|
|
5
5
|
values: Record<string, unknown>;
|
|
6
6
|
quickAdd: ResolvedChildConfig["quick_add"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { StatusGroupDef } from "
|
|
2
|
-
import type { StatusInfo } from "
|
|
1
|
+
import type { StatusGroupDef } from "../../types/schema";
|
|
2
|
+
import type { StatusInfo } from "../../types/api";
|
|
3
3
|
interface StatusGroupsDisplayProps {
|
|
4
4
|
statusGroups: Record<string, StatusGroupDef>;
|
|
5
5
|
objectStatuses: StatusInfo[] | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ListResponse } from "
|
|
1
|
+
import type { ListResponse } from "../types/api";
|
|
2
2
|
export declare const ENTITY_CHILDREN_KEY: "entity-children";
|
|
3
3
|
export declare function useChildrenData(parentEntity: string, parentId: string, childCode: string, foreignKey: string | string[], sort?: string, limit?: number): import("@tanstack/react-query").UseQueryResult<ListResponse<Record<string, unknown>>, Error>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Entity } from "
|
|
1
|
+
import type { Entity } from "../types/schema";
|
|
2
2
|
export declare function useEntity(entityCode: string | undefined): Entity | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ListParams } from "
|
|
2
|
-
export declare function useEntityData(entity: string | undefined, params: ListParams): import("@tanstack/react-query").UseQueryResult<import("
|
|
1
|
+
import type { ListParams } from "../types/api";
|
|
2
|
+
export declare function useEntityData(entity: string | undefined, params: ListParams): import("@tanstack/react-query").UseQueryResult<import("../types/api").ListResponse<Record<string, unknown>>, Error>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PkValues } from "
|
|
1
|
+
import type { PkValues } from "../types/schema";
|
|
2
2
|
export declare function useEntityItem(entity: string | undefined, pkValues: PkValues | string | undefined): import("@tanstack/react-query").UseQueryResult<import("..").DataResponse<Record<string, unknown>>, Error>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PkValues } from "
|
|
2
|
-
import type { ActionExecuteRequest } from "
|
|
1
|
+
import type { PkValues } from "../types/schema";
|
|
2
|
+
import type { ActionExecuteRequest } from "../api/data";
|
|
3
3
|
export declare function useCreateEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, Record<string, unknown>, unknown>;
|
|
4
4
|
export declare function useUpdateEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, {
|
|
5
5
|
pkValues: PkValues | string;
|
|
@@ -7,7 +7,7 @@ export declare function useUpdateEntity(entityCode: string): import("@tanstack/r
|
|
|
7
7
|
}, unknown>;
|
|
8
8
|
export declare function useDeleteEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<void, Error, string | PkValues, unknown>;
|
|
9
9
|
export declare function useRestoreEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<void, Error, string | PkValues, unknown>;
|
|
10
|
-
export declare function useExecuteAction(entityCode?: string): import("@tanstack/react-query").UseMutationResult<import("
|
|
10
|
+
export declare function useExecuteAction(entityCode?: string): import("@tanstack/react-query").UseMutationResult<import("../api/data").ActionExecuteResponse, Error, {
|
|
11
11
|
actionCode: string;
|
|
12
12
|
body: ActionExecuteRequest;
|
|
13
13
|
}, unknown>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Screen } from "
|
|
1
|
+
import type { Screen } from "../types/schema";
|
|
2
2
|
export declare function useScreen(screenCode: string | undefined): Screen | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ViewItem } from "
|
|
1
|
+
import type { ViewItem } from "../components/views/ViewSwitcher";
|
|
2
2
|
/**
|
|
3
3
|
* useViews fetches DB views for a screen and merges with system views (presets) from DSL.
|
|
4
4
|
* Returns a unified list with source tagging.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChildDisplayMode, ChildQuickAdd, ChildRelation, CardsConfig, Entity, LayoutNode, LocalizedString, TimelineConfig } from "
|
|
1
|
+
import type { ChildDisplayMode, ChildQuickAdd, ChildRelation, CardsConfig, Entity, LayoutNode, LocalizedString, TimelineConfig } from "../types/schema";
|
|
2
2
|
export interface ResolvedChildConfig {
|
|
3
3
|
entity: string;
|
|
4
4
|
foreign_key: string | string[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Schema } from "
|
|
2
|
-
import type { PendingChildRow } from "
|
|
1
|
+
import type { Schema } from "../types/schema";
|
|
2
|
+
import type { PendingChildRow } from "../components/detail-layout/LayoutRenderer";
|
|
3
3
|
export declare function validatePendingChildren(pendingChildren: Record<string, PendingChildRow[]> | undefined, schema: Schema | undefined): Record<string, Record<string, string[]>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@declarion/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "React SDK for Declarion, the schema-driven business apps platform.",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"react": "^19.0.0",
|
|
71
71
|
"react-dom": "^19.0.0",
|
|
72
72
|
"tailwindcss": "^4.0.0",
|
|
73
|
+
"tsc-alias": "^1.8.16",
|
|
73
74
|
"typescript": "^5.7.0",
|
|
74
75
|
"vite": "^6.0.0",
|
|
75
76
|
"vitest": "^4.1.0"
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"scripts": {
|
|
78
79
|
"dev": "vite",
|
|
79
80
|
"build": "tsc --noEmit && vite build",
|
|
80
|
-
"build:lib": "vite build --config vite.lib.config.ts && tsc -p tsconfig.lib.json",
|
|
81
|
+
"build:lib": "vite build --config vite.lib.config.ts && tsc -p tsconfig.lib.json && tsc-alias -p tsconfig.lib.json",
|
|
81
82
|
"lint": "tsc --noEmit",
|
|
82
83
|
"test": "vitest run",
|
|
83
84
|
"preview": "vite preview"
|