@juicemantics/veloiq-ui 0.1.0 → 0.2.1
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.mts +70 -4
- package/dist/index.d.ts +70 -4
- package/dist/index.js +2154 -650
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2152 -653
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -2
package/dist/index.d.mts
CHANGED
|
@@ -103,11 +103,14 @@ interface FieldDef {
|
|
|
103
103
|
readOnly?: boolean;
|
|
104
104
|
unique?: boolean;
|
|
105
105
|
nullable?: boolean;
|
|
106
|
+
showViewType?: string;
|
|
107
|
+
editViewType?: string;
|
|
106
108
|
/** Roles allowed to read this field (absent = all roles). Emitted by veloiq_field(read_roles=…). */
|
|
107
109
|
readRoles?: string[];
|
|
108
110
|
/** Roles allowed to write this field (absent = all roles). Emitted by veloiq_field(write_roles=…). */
|
|
109
111
|
writeRoles?: string[];
|
|
110
112
|
}
|
|
113
|
+
type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "read-and-edit-list" | "read-and-edit-csv" | "editable-csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
|
|
111
114
|
interface MillerLeafConfig {
|
|
112
115
|
relationPath: string;
|
|
113
116
|
targetKey: string;
|
|
@@ -128,8 +131,8 @@ interface RelationDef {
|
|
|
128
131
|
isRecursive?: boolean;
|
|
129
132
|
minItems?: number;
|
|
130
133
|
maxItems?: number;
|
|
131
|
-
showViewType?:
|
|
132
|
-
editViewType?:
|
|
134
|
+
showViewType?: RelationViewType;
|
|
135
|
+
editViewType?: RelationViewType;
|
|
133
136
|
showViewTypeFromCsv?: boolean;
|
|
134
137
|
editViewTypeFromCsv?: boolean;
|
|
135
138
|
showCustomPageName?: string;
|
|
@@ -155,6 +158,15 @@ interface ModelDef {
|
|
|
155
158
|
description?: string;
|
|
156
159
|
pkField?: string;
|
|
157
160
|
listViewType?: "table" | "gallery" | "calendar" | "totals-details";
|
|
161
|
+
/** True when this ModelDef represents a NamedQuery rather than a plain model table. */
|
|
162
|
+
isNamedQuery?: boolean;
|
|
163
|
+
/** Resource name of the primary model (for show/edit navigation and write routing). */
|
|
164
|
+
primaryResource?: string;
|
|
165
|
+
/** Default sort applied on first load when no saved preference exists. */
|
|
166
|
+
defaultSort?: {
|
|
167
|
+
field: string;
|
|
168
|
+
order: "asc" | "desc";
|
|
169
|
+
};
|
|
158
170
|
}
|
|
159
171
|
type PrimaryShowRendererProps = {
|
|
160
172
|
model: ModelDef;
|
|
@@ -163,7 +175,6 @@ type PrimaryShowRendererProps = {
|
|
|
163
175
|
viewName?: string;
|
|
164
176
|
};
|
|
165
177
|
declare const PrimaryShowContext: React__default.Context<React__default.ComponentType<PrimaryShowRendererProps> | null>;
|
|
166
|
-
type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
|
|
167
178
|
interface BulkActionDef {
|
|
168
179
|
key: string;
|
|
169
180
|
label: string;
|
|
@@ -328,6 +339,8 @@ declare const DynamicList: React__default.FC<{
|
|
|
328
339
|
rowSelection?: any;
|
|
329
340
|
extraHeaderButtons?: React__default.ReactNode;
|
|
330
341
|
bulkActions?: BulkActionDef[];
|
|
342
|
+
preferencesResourceOverride?: string;
|
|
343
|
+
defaultListVisible?: boolean;
|
|
331
344
|
}>;
|
|
332
345
|
|
|
333
346
|
/**
|
|
@@ -402,6 +415,59 @@ interface LoginPageProps {
|
|
|
402
415
|
}
|
|
403
416
|
declare const LoginPage: React__default.FC<LoginPageProps>;
|
|
404
417
|
|
|
418
|
+
declare const DashboardPage: React__default.FC;
|
|
419
|
+
|
|
420
|
+
interface DashboardCell {
|
|
421
|
+
id: string;
|
|
422
|
+
model: string;
|
|
423
|
+
source_type: "model";
|
|
424
|
+
row: number;
|
|
425
|
+
col: number;
|
|
426
|
+
view_type: string | null;
|
|
427
|
+
html_style: string;
|
|
428
|
+
min_width: string | null;
|
|
429
|
+
max_width: string | null;
|
|
430
|
+
min_height: string | null;
|
|
431
|
+
max_height: string | null;
|
|
432
|
+
}
|
|
433
|
+
interface DashboardTab {
|
|
434
|
+
id: string;
|
|
435
|
+
name: string;
|
|
436
|
+
module?: string;
|
|
437
|
+
cells: DashboardCell[];
|
|
438
|
+
}
|
|
439
|
+
interface DashboardConfig {
|
|
440
|
+
tabs: DashboardTab[];
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
interface Props {
|
|
444
|
+
config: DashboardConfig;
|
|
445
|
+
allModels: ModelDef[];
|
|
446
|
+
onConfigChange: (next: DashboardConfig) => void;
|
|
447
|
+
}
|
|
448
|
+
declare const ViewsGrid: React__default.FC<Props>;
|
|
449
|
+
|
|
450
|
+
declare const RecentActivityPanel: React__default.FC;
|
|
451
|
+
|
|
452
|
+
declare const PinnedRecordsPanel: React__default.FC;
|
|
453
|
+
|
|
454
|
+
interface RecentRecord {
|
|
455
|
+
id: string | number;
|
|
456
|
+
_label: string;
|
|
457
|
+
created_at?: string;
|
|
458
|
+
updated_at?: string;
|
|
459
|
+
[key: string]: any;
|
|
460
|
+
}
|
|
461
|
+
interface RecentActivityGroup {
|
|
462
|
+
model_name: string;
|
|
463
|
+
resource: string;
|
|
464
|
+
records: RecentRecord[];
|
|
465
|
+
}
|
|
466
|
+
interface RecentActivityData {
|
|
467
|
+
groups: RecentActivityGroup[];
|
|
468
|
+
days: number;
|
|
469
|
+
}
|
|
470
|
+
|
|
405
471
|
type ShortcutDef = {
|
|
406
472
|
key: string;
|
|
407
473
|
ctrl?: boolean;
|
|
@@ -471,4 +537,4 @@ declare const getModelTone: (modelLike?: string | {
|
|
|
471
537
|
|
|
472
538
|
declare const authSystemModels: ModelDef[];
|
|
473
539
|
|
|
474
|
-
export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CustomSider, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, PaneNavigationContext, PrimaryShowContext, type PrimaryShowRendererProps, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, httpClient, normalizeToneKey, renderRelationBlock, setColorSchemas, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
|
|
540
|
+
export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, httpClient, normalizeToneKey, renderRelationBlock, setColorSchemas, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
|
package/dist/index.d.ts
CHANGED
|
@@ -103,11 +103,14 @@ interface FieldDef {
|
|
|
103
103
|
readOnly?: boolean;
|
|
104
104
|
unique?: boolean;
|
|
105
105
|
nullable?: boolean;
|
|
106
|
+
showViewType?: string;
|
|
107
|
+
editViewType?: string;
|
|
106
108
|
/** Roles allowed to read this field (absent = all roles). Emitted by veloiq_field(read_roles=…). */
|
|
107
109
|
readRoles?: string[];
|
|
108
110
|
/** Roles allowed to write this field (absent = all roles). Emitted by veloiq_field(write_roles=…). */
|
|
109
111
|
writeRoles?: string[];
|
|
110
112
|
}
|
|
113
|
+
type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "read-and-edit-list" | "read-and-edit-csv" | "editable-csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
|
|
111
114
|
interface MillerLeafConfig {
|
|
112
115
|
relationPath: string;
|
|
113
116
|
targetKey: string;
|
|
@@ -128,8 +131,8 @@ interface RelationDef {
|
|
|
128
131
|
isRecursive?: boolean;
|
|
129
132
|
minItems?: number;
|
|
130
133
|
maxItems?: number;
|
|
131
|
-
showViewType?:
|
|
132
|
-
editViewType?:
|
|
134
|
+
showViewType?: RelationViewType;
|
|
135
|
+
editViewType?: RelationViewType;
|
|
133
136
|
showViewTypeFromCsv?: boolean;
|
|
134
137
|
editViewTypeFromCsv?: boolean;
|
|
135
138
|
showCustomPageName?: string;
|
|
@@ -155,6 +158,15 @@ interface ModelDef {
|
|
|
155
158
|
description?: string;
|
|
156
159
|
pkField?: string;
|
|
157
160
|
listViewType?: "table" | "gallery" | "calendar" | "totals-details";
|
|
161
|
+
/** True when this ModelDef represents a NamedQuery rather than a plain model table. */
|
|
162
|
+
isNamedQuery?: boolean;
|
|
163
|
+
/** Resource name of the primary model (for show/edit navigation and write routing). */
|
|
164
|
+
primaryResource?: string;
|
|
165
|
+
/** Default sort applied on first load when no saved preference exists. */
|
|
166
|
+
defaultSort?: {
|
|
167
|
+
field: string;
|
|
168
|
+
order: "asc" | "desc";
|
|
169
|
+
};
|
|
158
170
|
}
|
|
159
171
|
type PrimaryShowRendererProps = {
|
|
160
172
|
model: ModelDef;
|
|
@@ -163,7 +175,6 @@ type PrimaryShowRendererProps = {
|
|
|
163
175
|
viewName?: string;
|
|
164
176
|
};
|
|
165
177
|
declare const PrimaryShowContext: React__default.Context<React__default.ComponentType<PrimaryShowRendererProps> | null>;
|
|
166
|
-
type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
|
|
167
178
|
interface BulkActionDef {
|
|
168
179
|
key: string;
|
|
169
180
|
label: string;
|
|
@@ -328,6 +339,8 @@ declare const DynamicList: React__default.FC<{
|
|
|
328
339
|
rowSelection?: any;
|
|
329
340
|
extraHeaderButtons?: React__default.ReactNode;
|
|
330
341
|
bulkActions?: BulkActionDef[];
|
|
342
|
+
preferencesResourceOverride?: string;
|
|
343
|
+
defaultListVisible?: boolean;
|
|
331
344
|
}>;
|
|
332
345
|
|
|
333
346
|
/**
|
|
@@ -402,6 +415,59 @@ interface LoginPageProps {
|
|
|
402
415
|
}
|
|
403
416
|
declare const LoginPage: React__default.FC<LoginPageProps>;
|
|
404
417
|
|
|
418
|
+
declare const DashboardPage: React__default.FC;
|
|
419
|
+
|
|
420
|
+
interface DashboardCell {
|
|
421
|
+
id: string;
|
|
422
|
+
model: string;
|
|
423
|
+
source_type: "model";
|
|
424
|
+
row: number;
|
|
425
|
+
col: number;
|
|
426
|
+
view_type: string | null;
|
|
427
|
+
html_style: string;
|
|
428
|
+
min_width: string | null;
|
|
429
|
+
max_width: string | null;
|
|
430
|
+
min_height: string | null;
|
|
431
|
+
max_height: string | null;
|
|
432
|
+
}
|
|
433
|
+
interface DashboardTab {
|
|
434
|
+
id: string;
|
|
435
|
+
name: string;
|
|
436
|
+
module?: string;
|
|
437
|
+
cells: DashboardCell[];
|
|
438
|
+
}
|
|
439
|
+
interface DashboardConfig {
|
|
440
|
+
tabs: DashboardTab[];
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
interface Props {
|
|
444
|
+
config: DashboardConfig;
|
|
445
|
+
allModels: ModelDef[];
|
|
446
|
+
onConfigChange: (next: DashboardConfig) => void;
|
|
447
|
+
}
|
|
448
|
+
declare const ViewsGrid: React__default.FC<Props>;
|
|
449
|
+
|
|
450
|
+
declare const RecentActivityPanel: React__default.FC;
|
|
451
|
+
|
|
452
|
+
declare const PinnedRecordsPanel: React__default.FC;
|
|
453
|
+
|
|
454
|
+
interface RecentRecord {
|
|
455
|
+
id: string | number;
|
|
456
|
+
_label: string;
|
|
457
|
+
created_at?: string;
|
|
458
|
+
updated_at?: string;
|
|
459
|
+
[key: string]: any;
|
|
460
|
+
}
|
|
461
|
+
interface RecentActivityGroup {
|
|
462
|
+
model_name: string;
|
|
463
|
+
resource: string;
|
|
464
|
+
records: RecentRecord[];
|
|
465
|
+
}
|
|
466
|
+
interface RecentActivityData {
|
|
467
|
+
groups: RecentActivityGroup[];
|
|
468
|
+
days: number;
|
|
469
|
+
}
|
|
470
|
+
|
|
405
471
|
type ShortcutDef = {
|
|
406
472
|
key: string;
|
|
407
473
|
ctrl?: boolean;
|
|
@@ -471,4 +537,4 @@ declare const getModelTone: (modelLike?: string | {
|
|
|
471
537
|
|
|
472
538
|
declare const authSystemModels: ModelDef[];
|
|
473
539
|
|
|
474
|
-
export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CustomSider, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, PaneNavigationContext, PrimaryShowContext, type PrimaryShowRendererProps, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, httpClient, normalizeToneKey, renderRelationBlock, setColorSchemas, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
|
|
540
|
+
export { API_URL, AllModelsProvider, type BulkActionDef, ColorModeContext, ColorModeContextProvider, CustomSider, type DashboardCell, type DashboardConfig, DashboardPage, type DashboardTab, DynamicCreate, DynamicEdit, DynamicList, DynamicShow, ExecutableHtml, type FieldDef, GlobalSearch, HierarchyView, HorizontalMenu, InlinePlotlyHtml, LayoutWrapper, type LayoutWrapperProps, LoginPage, type LoginPageProps, type MillerLeafConfig, type ModelDef, ModelHeading, MultiPaneLayout, PaneNavigationContext, PinnedRecordsPanel, PrimaryShowContext, type PrimaryShowRendererProps, type RecentActivityData, type RecentActivityGroup, RecentActivityPanel, type RecentRecord, ReferenceField, type RelationDef, ResourceContext, type ResourceDef, ShowFooterButtons, StandardList, StandardShow, type ViewConfigRow, ViewsGrid, accessControlProvider, authProvider, authSystemModels, authenticatedFetch, buildShowTabFormOptions, generateResources, getModelTone, httpClient, normalizeToneKey, renderRelationBlock, setColorSchemas, useAllModels, useKeyboardShortcuts, useMetadataModal, usePaneNavigation, useShowActionsPreferences, useShowEditableForm, useStandardShowTabs };
|