@declarion/react 0.1.0

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.
Files changed (136) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -0
  3. package/dist-lib/JsonEditor-C5NOzsey.js +71 -0
  4. package/dist-lib/JsonEditor-C5NOzsey.js.map +1 -0
  5. package/dist-lib/api/auth.d.ts +11 -0
  6. package/dist-lib/api/client.d.ts +3 -0
  7. package/dist-lib/api/data.d.ts +28 -0
  8. package/dist-lib/api/entities.d.ts +75 -0
  9. package/dist-lib/api/events.d.ts +9 -0
  10. package/dist-lib/api/params.d.ts +3 -0
  11. package/dist-lib/api/properties.d.ts +3 -0
  12. package/dist-lib/api/schema.d.ts +2 -0
  13. package/dist-lib/api/status.d.ts +2 -0
  14. package/dist-lib/app.d.ts +1 -0
  15. package/dist-lib/components/columns/ColumnPicker.d.ts +15 -0
  16. package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +8 -0
  17. package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +13 -0
  18. package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +15 -0
  19. package/dist-lib/components/detail-layout/ChildrenCards.d.ts +2 -0
  20. package/dist-lib/components/detail-layout/ChildrenList.d.ts +2 -0
  21. package/dist-lib/components/detail-layout/ChildrenTable.d.ts +2 -0
  22. package/dist-lib/components/detail-layout/ChildrenTimeline.d.ts +2 -0
  23. package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +15 -0
  24. package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +15 -0
  25. package/dist-lib/components/detail-layout/FieldsBlock.d.ts +7 -0
  26. package/dist-lib/components/detail-layout/LayoutColumn.d.ts +9 -0
  27. package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +42 -0
  28. package/dist-lib/components/detail-layout/LayoutRow.d.ts +8 -0
  29. package/dist-lib/components/detail-layout/LayoutTabs.d.ts +8 -0
  30. package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +8 -0
  31. package/dist-lib/components/detail-layout/QuickAddForm.d.ts +10 -0
  32. package/dist-lib/components/detail-layout/SectionBlock.d.ts +8 -0
  33. package/dist-lib/components/detail-layout/StatusesBlock.d.ts +8 -0
  34. package/dist-lib/components/detail-layout/TimelineComposer.d.ts +10 -0
  35. package/dist-lib/components/detail-layout/index.d.ts +18 -0
  36. package/dist-lib/components/detail-layout/useQuickAdd.d.ts +17 -0
  37. package/dist-lib/components/fields/BoolField.d.ts +2 -0
  38. package/dist-lib/components/fields/EmailField.d.ts +2 -0
  39. package/dist-lib/components/fields/EnumField.d.ts +2 -0
  40. package/dist-lib/components/fields/IntArrayField.d.ts +2 -0
  41. package/dist-lib/components/fields/JsonEditor.d.ts +9 -0
  42. package/dist-lib/components/fields/JsonField.d.ts +2 -0
  43. package/dist-lib/components/fields/MultilangField.d.ts +2 -0
  44. package/dist-lib/components/fields/MultilangTextField.d.ts +2 -0
  45. package/dist-lib/components/fields/NumberField.d.ts +2 -0
  46. package/dist-lib/components/fields/PasswordField.d.ts +2 -0
  47. package/dist-lib/components/fields/RefField.d.ts +2 -0
  48. package/dist-lib/components/fields/SecretField.d.ts +2 -0
  49. package/dist-lib/components/fields/StringArrayField.d.ts +2 -0
  50. package/dist-lib/components/fields/StringField.d.ts +2 -0
  51. package/dist-lib/components/fields/StructureField.d.ts +2 -0
  52. package/dist-lib/components/fields/TextField.d.ts +2 -0
  53. package/dist-lib/components/fields/TimestampField.d.ts +2 -0
  54. package/dist-lib/components/fields/UrlField.d.ts +2 -0
  55. package/dist-lib/components/fields/index.d.ts +16 -0
  56. package/dist-lib/components/filters/FilterChips.d.ts +16 -0
  57. package/dist-lib/components/filters/FilterDrawer.d.ts +27 -0
  58. package/dist-lib/components/layout/Layout.d.ts +1 -0
  59. package/dist-lib/components/layout/Sidebar.d.ts +1 -0
  60. package/dist-lib/components/layout/TabBar.d.ts +1 -0
  61. package/dist-lib/components/layout/ThemeToggle.d.ts +1 -0
  62. package/dist-lib/components/layout/TopBar.d.ts +1 -0
  63. package/dist-lib/components/pages/AdminCatalogPage.d.ts +1 -0
  64. package/dist-lib/components/pages/LoginPage.d.ts +1 -0
  65. package/dist-lib/components/pages/NotFoundPage.d.ts +1 -0
  66. package/dist-lib/components/pages/SSOCallbackPage.d.ts +1 -0
  67. package/dist-lib/components/pages/SignupPage.d.ts +1 -0
  68. package/dist-lib/components/pages/SmartDetailPage.d.ts +5 -0
  69. package/dist-lib/components/pages/SmartListPage.d.ts +5 -0
  70. package/dist-lib/components/pages/SmartRecordListPage.d.ts +5 -0
  71. package/dist-lib/components/shared/ActionButton.d.ts +24 -0
  72. package/dist-lib/components/shared/ActionConfirmDialog.d.ts +10 -0
  73. package/dist-lib/components/shared/ActionDialog.d.ts +22 -0
  74. package/dist-lib/components/shared/ActionResultDialog.d.ts +18 -0
  75. package/dist-lib/components/shared/AssociationTabs.d.ts +9 -0
  76. package/dist-lib/components/shared/BatchActionProgress.d.ts +18 -0
  77. package/dist-lib/components/shared/ConfirmDialog.d.ts +11 -0
  78. package/dist-lib/components/shared/DynamicIcon.d.ts +6 -0
  79. package/dist-lib/components/shared/EmptyState.d.ts +9 -0
  80. package/dist-lib/components/shared/ErrorBoundary.d.ts +22 -0
  81. package/dist-lib/components/shared/LoadingSkeleton.d.ts +5 -0
  82. package/dist-lib/components/shared/PageHeader.d.ts +8 -0
  83. package/dist-lib/components/shared/RowActionItem.d.ts +11 -0
  84. package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +11 -0
  85. package/dist-lib/components/ui/alert-dialog.d.ts +14 -0
  86. package/dist-lib/components/ui/badge.d.ts +9 -0
  87. package/dist-lib/components/ui/button.d.ts +11 -0
  88. package/dist-lib/components/ui/card.d.ts +8 -0
  89. package/dist-lib/components/ui/dialog.d.ts +13 -0
  90. package/dist-lib/components/ui/dropdown-menu.d.ts +24 -0
  91. package/dist-lib/components/ui/input.d.ts +3 -0
  92. package/dist-lib/components/ui/label.d.ts +5 -0
  93. package/dist-lib/components/ui/select.d.ts +13 -0
  94. package/dist-lib/components/ui/separator.d.ts +4 -0
  95. package/dist-lib/components/ui/skeleton.d.ts +2 -0
  96. package/dist-lib/components/ui/table.d.ts +10 -0
  97. package/dist-lib/components/ui/textarea.d.ts +3 -0
  98. package/dist-lib/components/views/ViewSwitcher.d.ts +27 -0
  99. package/dist-lib/hooks/useAssociatedData.d.ts +10 -0
  100. package/dist-lib/hooks/useAuth.d.ts +21 -0
  101. package/dist-lib/hooks/useChildrenData.d.ts +3 -0
  102. package/dist-lib/hooks/useColumns.d.ts +13 -0
  103. package/dist-lib/hooks/useDebounce.d.ts +1 -0
  104. package/dist-lib/hooks/useEntity.d.ts +2 -0
  105. package/dist-lib/hooks/useEntityData.d.ts +2 -0
  106. package/dist-lib/hooks/useEntityItem.d.ts +2 -0
  107. package/dist-lib/hooks/useFilters.d.ts +11 -0
  108. package/dist-lib/hooks/useMutations.d.ts +13 -0
  109. package/dist-lib/hooks/useObjectStatus.d.ts +5 -0
  110. package/dist-lib/hooks/useParams.d.ts +2 -0
  111. package/dist-lib/hooks/useProperties.d.ts +5 -0
  112. package/dist-lib/hooks/useSSE.d.ts +1 -0
  113. package/dist-lib/hooks/useSchema.d.ts +1 -0
  114. package/dist-lib/hooks/useScreen.d.ts +2 -0
  115. package/dist-lib/hooks/useTabNavigate.d.ts +8 -0
  116. package/dist-lib/hooks/useViews.d.ts +6 -0
  117. package/dist-lib/index.d.ts +37 -0
  118. package/dist-lib/index.js +8424 -0
  119. package/dist-lib/index.js.map +1 -0
  120. package/dist-lib/lib/actions.d.ts +43 -0
  121. package/dist-lib/lib/child-config.d.ts +23 -0
  122. package/dist-lib/lib/children-validation.d.ts +3 -0
  123. package/dist-lib/lib/filters.d.ts +42 -0
  124. package/dist-lib/lib/quick-add.d.ts +2 -0
  125. package/dist-lib/lib/size-value.d.ts +16 -0
  126. package/dist-lib/lib/theme-utils.d.ts +3 -0
  127. package/dist-lib/lib/timestamp.d.ts +8 -0
  128. package/dist-lib/lib/utils.d.ts +2 -0
  129. package/dist-lib/main.d.ts +1 -0
  130. package/dist-lib/stores/auth.d.ts +15 -0
  131. package/dist-lib/stores/screen-registry.d.ts +3 -0
  132. package/dist-lib/stores/tabs.d.ts +21 -0
  133. package/dist-lib/stores/theme.d.ts +10 -0
  134. package/dist-lib/types/api.d.ts +178 -0
  135. package/dist-lib/types/schema.d.ts +380 -0
  136. package/package.json +85 -0
@@ -0,0 +1,13 @@
1
+ import type { PkValues } from "@/types/schema";
2
+ import type { ActionExecuteRequest } from "@/api/data";
3
+ export declare function useCreateEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, Record<string, unknown>, unknown>;
4
+ export declare function useUpdateEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<import("..").DataResponse<Record<string, unknown>>, Error, {
5
+ pkValues: PkValues | string;
6
+ data: Record<string, unknown>;
7
+ }, unknown>;
8
+ export declare function useDeleteEntity(entityCode: string): import("@tanstack/react-query").UseMutationResult<void, Error, string | PkValues, unknown>;
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("@/api/data").ActionExecuteResponse, Error, {
11
+ actionCode: string;
12
+ body: ActionExecuteRequest;
13
+ }, unknown>;
@@ -0,0 +1,5 @@
1
+ export declare function useSetStatus(entity: string | undefined, id: string | undefined): import("@tanstack/react-query").UseMutationResult<import("..").StatusInfo, Error, {
2
+ groupCode: string;
3
+ statusCode: string;
4
+ note?: string;
5
+ }, unknown>;
@@ -0,0 +1,2 @@
1
+ export declare function usePublicParams(): import("@tanstack/react-query").UseQueryResult<import("..").PublicParam[], Error>;
2
+ export declare function useResolvedParam(code: string): import("@tanstack/react-query").UseQueryResult<import("../types/api").ResolvedParam, Error>;
@@ -0,0 +1,5 @@
1
+ export declare function useSetProperty(entity: string | undefined, id: string | undefined): import("@tanstack/react-query").UseMutationResult<import("..").PropertyValue, Error, {
2
+ propertyCode: string;
3
+ value: unknown;
4
+ }, unknown>;
5
+ export declare function useDeleteProperty(entity: string | undefined, id: string | undefined): import("@tanstack/react-query").UseMutationResult<void, Error, string, unknown>;
@@ -0,0 +1 @@
1
+ export declare function useSSE(): void;
@@ -0,0 +1 @@
1
+ export declare function useSchema(): import("@tanstack/react-query").UseQueryResult<import("..").Schema, Error>;
@@ -0,0 +1,2 @@
1
+ import type { Screen } from "@/types/schema";
2
+ export declare function useScreen(screenCode: string | undefined): Screen | undefined;
@@ -0,0 +1,8 @@
1
+ interface TabNavigateOptions {
2
+ title?: string;
3
+ icon?: string;
4
+ search?: string;
5
+ replace?: boolean;
6
+ }
7
+ export declare function useTabNavigate(): (pathname: string, opts?: TabNavigateOptions) => void;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { ViewItem } from "@/components/views/ViewSwitcher";
2
+ /**
3
+ * useViews fetches DB views for a screen and merges with system views (presets) from DSL.
4
+ * Returns a unified list with source tagging.
5
+ */
6
+ export declare function useViews(screenCode: string, userId?: string): ViewItem[];
@@ -0,0 +1,37 @@
1
+ export { App } from "./app";
2
+ export { App as Declarion } from "./app";
3
+ export type { LocalizedString, LanguageDef, Schema, Entity, EntityField, Screen, NavNode, Action, ChildRelation, StatusDef, StatusGroupDef, PropertyDef, EnumDef, ParameterDef, StructureDef, } from "./types/schema";
4
+ export { loc, fieldDisplayName } from "./types/schema";
5
+ export type { ListResponse, DataResponse, ListMeta, ApiError, AuthUser, LoginResponse, CheckSetupResponse, ListParams, Tenant, StatusInfo, PropertyValue, PublicParam, V2Meta, Refs, V2StatusInstance, V2PropertyInstance, V2ParamInstance, V2ListResponse, V2ListParams, EnrichedRow, } from "./types/api";
6
+ export { EntityClient, RefCache, entityClient } from "./api/entities";
7
+ export type { RowHelpers } from "./api/entities";
8
+ export { useSchema } from "./hooks/useSchema";
9
+ export { useEntity } from "./hooks/useEntity";
10
+ export { useScreen } from "./hooks/useScreen";
11
+ export { useAuth } from "./hooks/useAuth";
12
+ export { useEntityData } from "./hooks/useEntityData";
13
+ export { useEntityItem } from "./hooks/useEntityItem";
14
+ export { useCreateEntity, useUpdateEntity, useDeleteEntity } from "./hooks/useMutations";
15
+ export { useDebounce } from "./hooks/useDebounce";
16
+ export { usePublicParams, useResolvedParam } from "./hooks/useParams";
17
+ export { useSetStatus } from "./hooks/useObjectStatus";
18
+ export { useSetProperty, useDeleteProperty } from "./hooks/useProperties";
19
+ export { useFilters } from "./hooks/useFilters";
20
+ export { useColumns } from "./hooks/useColumns";
21
+ export { useViews } from "./hooks/useViews";
22
+ export { registerScreen } from "./stores/screen-registry";
23
+ export { useTabStore, type TabItem } from "./stores/tabs";
24
+ export { useTabNavigate } from "./hooks/useTabNavigate";
25
+ export { SmartListPage } from "./components/pages/SmartListPage";
26
+ export { SmartDetailPage } from "./components/pages/SmartDetailPage";
27
+ export { SmartRecordListPage } from "./components/pages/SmartRecordListPage";
28
+ export { DynamicIcon } from "./components/shared/DynamicIcon";
29
+ export { PageHeader } from "./components/shared/PageHeader";
30
+ export { EmptyState } from "./components/shared/EmptyState";
31
+ export { ConfirmDialog } from "./components/shared/ConfirmDialog";
32
+ export { FilterDrawer } from "./components/filters/FilterDrawer";
33
+ export { FilterChips } from "./components/filters/FilterChips";
34
+ export { ColumnPicker } from "./components/columns/ColumnPicker";
35
+ export { ViewSwitcher } from "./components/views/ViewSwitcher";
36
+ export type { FilterNode, FilterOp } from "./lib/filters";
37
+ export { parseFiltersFromURL, setFiltersInURL, hasOrGroups, countActiveFilters, OP_LABELS, NO_VALUE_OPS, } from "./lib/filters";